From b1d15531e4fc2bcf10c02b58f6b8a7244bf8abef Mon Sep 17 00:00:00 2001 From: amhsirak Date: Wed, 22 Jan 2025 18:58:49 +0530 Subject: [PATCH] feat: set alter true while db sync --- server/src/storage/db.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/storage/db.ts b/server/src/storage/db.ts index 2f0fcde4..81c9c039 100644 --- a/server/src/storage/db.ts +++ b/server/src/storage/db.ts @@ -29,7 +29,7 @@ export const connectDB = async () => { export const syncDB = async () => { try { //setupAssociations(); - await sequelize.sync({ force: false }); // force: true will drop and recreate tables on every run + await sequelize.sync({ force: false, alter: true }); // force: true will drop and recreate tables on every run console.log('Database synced successfully!'); } catch (error) { console.error('Failed to sync database:', error);