-
Notifications
You must be signed in to change notification settings - Fork 225
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
lastRun
has incorrect value when migrating down
#142
Comments
Interesting, I thought we had a test for this, but I must be wrong. In the last major refactor I removed the use of If you could make a reduced test case, or even a failing test in our test suite that would be super helpful! |
The issue is in this test https://github.com/tj/node-migrate/blob/master/test/basic.js#L172 It expects that after migrating down
|
Yep! This would be a great little PR to open. If you don't have the time I can try to look at it this weekend. |
@stalniy have you had time to look at this? |
Sorry, I didn’t have time. Also I switched to sequelize cli, so it’s not an issue for me anymore |
Ok, thanks. I will make the update myself then. |
I'm trying to create a custom store for migrations, a table in SQL db:
All works good for
up
migrations but fordown
migrationslastRun
insave
method of my custom store has invalid value. That value actually points to the next migration not that one which was run.if you do
console.log(migration.title, migration.timestamp, set.lastRun)
at https://github.com/tj/node-migrate/blob/master/lib/migrate.js#L67 you will see thatmigration.title
andlastRun
have different values.So, then I don't know which migration to remove from
schema_migrations
tableThe text was updated successfully, but these errors were encountered: