-
Notifications
You must be signed in to change notification settings - Fork 39
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
Running with --only
should not fail if migration has already been run
#18
Comments
This makes sense. You could include this fix in your PR as well if you can manage to do it :) btw. I've updated many things in 1.5.3, so please remember to pull before you start implementing it |
Failing test for this issue https://github.com/sheerun/knex-migrate/compare/master...chadxz:failing-test-%2318?expand=1 Given this project is knex bindings + cli on top of umzug, not sure if the change should go here or there. Will keep looking. |
knex-migrate pretty much just calls out to umzug with the name of the migration specified in |
If they won’t change it we could catch and ignore this error maybe
…On Tue, 27 Mar 2018 at 01:31, Chad McElligott ***@***.***> wrote:
knex-migrate pretty much just calls out to umzug with the name of the
migration specified in --only %migration%. In umzug they explicitly check
for the migration to be pending and fail with the error message indicated
in the failing test. I opened an issue there to see what they think about
making the change.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#18 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAR2DUUgbfDpm5MpZ1TqpeyVj0p8rzewks5tiXphgaJpZM4SuFni>
.
|
Related Umzug issue: sequelize/umzug#167 |
When a migration has already been run, right now it bails out saying that the specified migration is not pending, and exits with an error status.
I think in a scenario where the specified migration doesn't exist, it makes sense to exit with an error status. But if the migration does exist and has already been run, I think it would make sense for the app to simply say "migration already applied" and exit with a success status. If the migration is already applied, the goal of running the command is already accomplished, so it isn't an error right?
This seems to be the logic that works for
up
... if you're already at the latest migration, then it simply does nothing and exits with a success status. I'm thinking this logic should be extended to running with--only
as well.LMK what you think.
The text was updated successfully, but these errors were encountered: