Reputation: 351
I am facing some problem with sequelize while i keep {force: true} . In this case old data dropped and new database is created and my saved data get lost. I want to create new database with old values. Can that possible with sequelize in node.js
Upvotes: 4
Views: 1316
Reputation: 7204
When you have database with some data and want to make some changes in db you have two possibilities:
Migrations allow you to to don't loose your data and instruct sequelize how to change tables.
There is ticket for recreating tables with alter tables instead of drop tables here
Upvotes: 2