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...");
|
||||
setupAssociations();
|
||||
// Associations werden vom Aufrufer (z. B. server.js) vor dem Aufruf von syncDatabase() gesetzt.
|
||||
// Kein setupAssociations() hier, sonst doppelter Aufruf → AssociationError (alias "rooms" etc.).
|
||||
|
||||
console.log("Synchronizing models...");
|
||||
await syncModelsWithUpdates(models);
|
||||
|
||||
Reference in New Issue
Block a user