Add logging for model synchronization and cache handling in syncDatabase.js
Enhance sequelize.js by adding a console log to indicate when models are being synced without constraints. Update syncDatabase.js to include important notes on caching issues with Node.js ES-Modules and log the model loading process during deployment synchronization.
This commit is contained in:
@@ -478,6 +478,7 @@ const syncModelsAlways = async (models) => {
|
||||
try {
|
||||
// constraints: false verhindert, dass Sequelize Foreign Keys automatisch erstellt
|
||||
// Foreign Keys sollten nur über Migrations verwaltet werden
|
||||
console.log(` 🔄 Syncing model ${model.name} with constraints: false`);
|
||||
await model.sync({ alter: true, force: false, constraints: false });
|
||||
} finally {
|
||||
// Restore VIRTUAL fields after sync
|
||||
|
||||
Reference in New Issue
Block a user