0

I am working on creating a database using sequelize. So I created my models corresponding to my tables on mySql and everything went very well. My tables "user" and "article" have been created in my database but I realize that it would take an additional model "support", so I created an additional model. For the new model to be taken into account during synchronization, I deleted my tables then stopped the server and then restarted it. Unfortunately this new model is not taken into account during the new creation, there are indeed the 2 original tables "user" and "article" but not the new one "support", how can I do so that it is taken into account?

I tried the other modes of synchronization: .sync(force: true) and (alter: true) but i doesn't work, i would want to reload the server and see that the new model is in the database as a new table like the others models that i created. Thanks a lot for your help !

Shadow
  • 33,525
  • 10
  • 51
  • 64
DavidD
  • 23
  • 4
  • Does this answer your question? [Sequelize Sync vs Migrations](https://stackoverflow.com/questions/41595755/sequelize-sync-vs-migrations) – Shadow Jan 19 '23 at 16:42

0 Answers0