Update syncDatabase function to remove setupAssociations call: Added comments to clarify that associations should be set by the caller to prevent AssociationError during synchronization.
This commit is contained in:
@@ -687,8 +687,8 @@ const syncDatabase = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Setting up associations...");
|
// Associations werden vom Aufrufer (z. B. server.js) vor dem Aufruf von syncDatabase() gesetzt.
|
||||||
setupAssociations();
|
// Kein setupAssociations() hier, sonst doppelter Aufruf → AssociationError (alias "rooms" etc.).
|
||||||
|
|
||||||
console.log("Synchronizing models...");
|
console.log("Synchronizing models...");
|
||||||
await syncModelsWithUpdates(models);
|
await syncModelsWithUpdates(models);
|
||||||
|
|||||||
Reference in New Issue
Block a user