(Same as Manuel Bieh's suggestion, but using a require instead of an import) In your migration file (if you don't have one, you can generate one by doing "sequelize migration:create") have the following code:
This will generate a blank skeleton migration file. While it doesn't copy your model structure over to the file, I do find it easier and cleaner than regenerating everything. Note: make sure to run the command from the containing directory of your migrations directory; otherwise the CLI will generate a new migration dir for you
PaulMest 在这一页的回答对我来说非常有用。
I used 'sequelize-auto-migrations' but it did not detect my changes.
我使用的是‘ Sequelize-auto-miations-v2’,这对我来说是正确的。
You can install it by: