From 4f3439e835df8992dd69a396f81d72ca433c23c7 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Thu, 5 Feb 2026 08:25:38 +0100 Subject: [PATCH] Update syncDatabase function to remove setupAssociations call: Added comments to clarify that associations should be set by the caller to prevent AssociationError during synchronization. --- backend/utils/syncDatabase.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/utils/syncDatabase.js b/backend/utils/syncDatabase.js index 3ee14d9..c3732a9 100644 --- a/backend/utils/syncDatabase.js +++ b/backend/utils/syncDatabase.js @@ -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);