0

So, I want to write an application which use some data migration. Where should I store a current state of db?

For example: I have a production server and my development machine. I wrote an application and 3 migrations for it. When I deploy the application server also runs 3 migrations. Now I'm going to write the 4th migration. How does server recognize that it need to run only 4th migration and it already run previous 3 migrations?

kharandziuk
  • 12,020
  • 17
  • 63
  • 121

1 Answers1

1

Ref https://github.com/sequelize/cli

sequelize init:migrations

will generate migration folder where you need to write migrations and

There are three types of storage that you can use: sequelize, json, and none.

  • sequelize : stores migrations and seeds in a table on the sequelize database
  • json : stores migrations and seeds on a json file
  • none : does not store any migration/seed
Keval
  • 3,246
  • 20
  • 28