cli icon indicating copy to clipboard operation
cli copied to clipboard

sequelize undo order for last migration

Open hfar opened this issue 11 years ago • 1 comments

Hello,

the case i have : at the beginning i had one migration file firstMigration.js ,after running migration one record add to sequelizemeta table "firstMigration.js".

then i added new migration file secondMigration.js ,after running migration another records added to sequelizemeta table "secondMigration.js".

The issue : when running sequelize db:migrate:undo and then the undo done for firstMigration.js ! i was expecting undo for secondMigration.js

hfar avatar Jun 30 '15 13:06 hfar

look like sequelize migration:create always creates migration file name with date/time stamp ,so having the migration file name with time stamp will solve the issue.

ie.

20150705100416-firstMigration.js

20150705100524-secondMigration.js

hfar avatar Jul 07 '15 11:07 hfar