mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-15 19:29:54 +02:00
Add automatic creation of webhook configuration table during database migration
Modify the auto-migrate script to check for and create the `webhook_bap_config` table if it does not exist, including a default entry and description. Remove explicit migration calls from `server/index.ts` as they are now handled by the Docker entrypoint script. Replit-Commit-Author: Agent Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/qkkp1hi
This commit is contained in:
1 parent
c55ec19939
commit
3304d1c912
3 files changed
+36
-17
No files matched your search
+2
-15
@@ -2,21 +2,8 @@ import express, { type Request, Response, NextFunction } from "express";
|
||||
import { registerRoutes } from "./routes.js";
|
||||
import { setupVite, serveStatic } from "./vite.js";
|
||||
|
||||
// Run database migrations first - FORCER EN PRODUCTION
|
||||
console.log('🔄 [STARTUP] Running database migrations...');
|
||||
console.log('🔍 [STARTUP] Environment:', process.env.NODE_ENV);
|
||||
console.log('🔍 [STARTUP] Has DATABASE_URL:', !!process.env.DATABASE_URL);
|
||||
|
||||
try {
|
||||
const { runMigrations } = await import('./migrations.js');
|
||||
await runMigrations();
|
||||
console.log('✅ [STARTUP] Database migrations completed');
|
||||
} catch (error) {
|
||||
console.error('❌ [STARTUP] Database migrations failed:', error);
|
||||
console.error('❌ [STARTUP] Error details:', JSON.stringify(error, null, 2));
|
||||
// NE PAS arrêter l'app pour éviter les boucles de redémarrage
|
||||
console.warn('⚠️ [STARTUP] Continuing without migrations to avoid restart loop');
|
||||
}
|
||||
// Les migrations sont gérées par docker-entrypoint.sh -> auto-migrate-production.sh
|
||||
console.log('ℹ️ [STARTUP] Migrations gérées par le script Docker au démarrage du conteneur');
|
||||
|
||||
// Initialize weather system
|
||||
console.log('🌤️ [STARTUP] Initializing weather system...');
|
||||
|
||||
Reference in new issue
Block a user