Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --sort (version or applied) to dbmigrator list #51

Merged
merged 1 commit into from Dec 13, 2017
Merged

Conversation

karenc
Copy link
Owner

@karenc karenc commented Oct 20, 2017

dbmigrator list only shows migrations in the order of migration
filenames at the moment. It works well for when users are trying to
migrate. When users are trying to rollback however, it is difficult to
tell which migration will be rolled back because the applied dates are
not in the same order as the migration filenames.

This change allows the user to specify the order by doing
--sort=applied:

version        | name            | is applied | date applied
----------------------------------------------------------------------
20160228212456   cool_stuff        True         2017-10-20 10:27:57.011677-07:00
20160228202637   add_table         False

`dbmigrator list` only shows migrations in the order of migration
filenames at the moment.  It works well for when users are trying to
migrate.  When users are trying to rollback however, it is difficult to
tell which migration will be rolled back because the applied dates are
not in the same order as the migration filenames.

This change allows the user to specify the order by doing
`--sort=applied`:

```
version        | name            | is applied | date applied
----------------------------------------------------------------------
20160228212456   cool_stuff        True         2017-10-20 10:27:57.011677-07:00
20160228202637   add_table         False
```
@coveralls
Copy link

coveralls commented Nov 22, 2017

Coverage Status

Coverage increased (+0.03%) to 97.668% when pulling e736e71 on list-by-applied into 3024d5e on master.

@karenc karenc merged commit 66bb853 into master Dec 13, 2017
@karenc karenc deleted the list-by-applied branch December 13, 2017 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants