Reputation: 1843
I can't seem to find the answer to this anywhere. I understand how Sequelize migrations and seeder work, but I have not found anywhere that states if they execute in some particular order. So if I start with a database, make a bunch of migrations, and then decide to initialize a brand new database from the original start point, will it execute the migrations in the exact same order.
I am using sequelize-cli to create migrations, so the file name does begin with a timestamp.
Upvotes: 11
Views: 7660
Reputation: 1843
For anyone that sees this in the future, it executes in the default sort order of the folder. So when you use the CLI to create a migration and it appends the timestamp, it guarantees that it will execute in the order they were created
Hope this helps
Upvotes: 27