It is very likely that you're calling sequelize.sync({force:true})
after defining your model. By passing {force:true}
, Sequelize drops and recreates all your tables.
sequelize DB clears out after restarting node app
-
06-10-2022 - |
Question
i am new to node and in my app i am using sequelize for my DB. Whenever i restart my node app, the DB data get cleared out. Any idea how to fix this?
I am not sure what to do
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow