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:
Torsten Schulz (local)
2026-02-05 08:25:38 +01:00
parent a5bec5baf7
commit 4f3439e835

View File

@@ -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);