feat: alter:true only in development mode
This commit is contained in:
@@ -33,7 +33,7 @@ export const syncDB = async () => {
|
|||||||
// force: true will drop and recreate tables on every run
|
// force: true will drop and recreate tables on every run
|
||||||
await sequelize.sync({
|
await sequelize.sync({
|
||||||
force: false,
|
force: false,
|
||||||
alter: true
|
alter: isDevelopment
|
||||||
});
|
});
|
||||||
console.log('Database synced successfully!');
|
console.log('Database synced successfully!');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user