History command
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
DB Version | Status tracked in Trunk | |||||
Trunk |
Fix Committed
|
Medium
|
Adam Connelly |
Bug Description
Create a command to get the history of versions of a database. The usage should be:
dbversion history [options]
If you type diversion history with no options it should list the versions (without tasks) from most recent to oldest:
2.1 Installed - 13/10/2011 10:53:26
2.0 Installed - 12/10/2011 11:59:03
...
If a version has been updated it should show that:
2.1 Installed - 13/10/2011 10:53:26, Updated - 13/10/2011 11:00:45
If the user wants to view information about the tasks that were run for each version they will get output like:
adamconnelly$ ./dbversion.sh history --showTasks
2.0 Installed - 15/10/2011 21:05:14, Updated - 15/10/2011 21:05:14
ddl.sql - 15/10/2011 21:05:14
1.0 Installed - 15/10/2011 21:04:39, Updated - 15/10/2011 21:04:39
data/users.sql - 15/10/2011 21:04:39
data/books.sql - 15/10/2011 21:04:39
data/authors.sql - 15/10/2011 21:04:39
schema/ddl.sql - 15/10/2011 21:04:39
Options:
* Connection string, dialect, etc.
* -v, --version The version you wish to get the history for.
* -t, --showTasks A flag indicating whether tasks should also be output.
* -o, --order [ascending, descending] The order the information should be displayed. Defaults to descending.
Related branches
- dbversion committers: Pending requested
-
Diff: 1494 lines (+969/-174)21 files modifiedsrc/DatabaseVersion.Console.Tests/Command/History/HistoryCommandTests.cs (+322/-0)
src/DatabaseVersion.Console.Tests/dbversion.Console.Tests.csproj (+7/-5)
src/DatabaseVersion.Console/App.config (+1/-1)
src/DatabaseVersion.Console/Command/History/HistoryArguments.cs (+50/-0)
src/DatabaseVersion.Console/Command/History/HistoryCommand.cs (+329/-0)
src/DatabaseVersion.Console/Command/History/HistoryOrder.cs (+29/-0)
src/DatabaseVersion.Console/dbversion.Console.csproj (+28/-21)
src/DatabaseVersion.Console/scripts/dbversion (+2/-0)
src/DatabaseVersion.Tests/dbversion.Tests.csproj (+4/-7)
src/DatabaseVersion.sln (+121/-117)
src/DatabaseVersion/Version/ClassicVersion/ClassicVersion.cs (+10/-5)
src/DatabaseVersion/Version/ClassicVersion/ClassicVersionMap.cs (+4/-1)
src/DatabaseVersion/Version/ClassicVersion/ClassicVersionProvider.cs (+7/-2)
src/DatabaseVersion/Version/ClassicVersion/ClassicVersionTask.cs (+1/-1)
src/DatabaseVersion/Version/IVersionProvider.cs (+5/-0)
src/DatabaseVersion/Version/NumericVersion/NumericVersion.cs (+8/-4)
src/DatabaseVersion/Version/NumericVersion/NumericVersionMap.cs (+1/-1)
src/DatabaseVersion/Version/NumericVersion/NumericVersionProvider.cs (+5/-0)
src/DatabaseVersion/Version/Task.cs (+14/-0)
src/DatabaseVersion/Version/VersionBase.cs (+17/-3)
src/DatabaseVersion/dbversion.csproj (+4/-6)
summary: |
- Current version command + History command |
description: | updated |
To have an extra option to display the tasks (or last task) run for that version would also be useful.