DEV Community

Discussion on: How to Add New Fields to Existing Sequelize Migration

Collapse
germantellezv profile image
Germán Téllez Vanegas

Hi, great tutorial. Does this keep the data in the database? or does it remove all data?

Collapse
ebzeal profile image
Olusola Ajayi

"npx sequelize-cli db:migrate" keeps the data in the database. To wipe the database you'd need to do "npx sequelize-cli db:migrate:undo:all" before "npx sequelize-cli db:migrate"

Collapse
rdecker573 profile image
rdecker573

If a migration is rolled back, I think that will remove data.

Collapse
sammykapienga profile image
sammy kapienga

Keeps data