Detuned
Detuned

Reputation: 3758

Sequelize migrations not picking up model changes

I'm new to Sequelize and have been reading through the documentation to get the migrations workflow, as described in this video, to work: Sequelize Migrations

I understand that running the commands from the CLI to model:create ... creates the model as well as the migration file. After running db:migrate to have the database up-to-date, I'd like to alter the model that was just created (e.g. adding a new column) and then creating migration:create ... it doesn't recognize the changes to the model. It's simply the boilerplate code for writing the migration from scratch.

In the video, I can see that creating a new migration detects the changes and creates the migration file accordingly.

Was this feature removed from the new Sequelize CLI? Or am I missing something here?

Upvotes: 0

Views: 847

Answers (1)

LT-
LT-

Reputation: 371

The video you linked is referring to a project that has been deprecated: https://github.com/origin1tech/sequelize-cmd

sequelize-cli is a different project and as far as I am aware does not auto generate migration files.

Upvotes: 1

Related Questions