문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top