chore: notes on db sync in dev mode
This commit is contained in:
@@ -31,6 +31,7 @@ export const syncDB = async () => {
|
|||||||
//setupAssociations();
|
//setupAssociations();
|
||||||
const isDevelopment = process.env.NODE_ENV === 'development';
|
const isDevelopment = process.env.NODE_ENV === 'development';
|
||||||
// force: true will drop and recreate tables on every run
|
// force: true will drop and recreate tables on every run
|
||||||
|
// Use `alter: true` only in development mode
|
||||||
await sequelize.sync({
|
await sequelize.sync({
|
||||||
force: false,
|
force: false,
|
||||||
alter: isDevelopment
|
alter: isDevelopment
|
||||||
|
|||||||
Reference in New Issue
Block a user