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:
@@ -210,6 +210,10 @@ const syncDatabase = async () => {
|
||||
// Deployment-Synchronisation (immer Schema-Updates)
|
||||
const syncDatabaseForDeployment = async () => {
|
||||
try {
|
||||
// WICHTIG: Bei Caching-Problemen das Script neu starten
|
||||
// Node.js cached ES-Module, daher müssen Models neu geladen werden
|
||||
console.log('📦 Lade Models neu (Node.js Module-Cache wird verwendet)...');
|
||||
|
||||
// Zeige den aktuellen Stage an
|
||||
const currentStage = process.env.STAGE || 'nicht gesetzt';
|
||||
console.log(`🚀 Starte Datenbank-Synchronisation für Deployment (Stage: ${currentStage})`);
|
||||
|
||||
Reference in New Issue
Block a user