mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-21 05:58:23 +02:00
Ensure webhook BAP configuration table is created on startup
Adds a new TypeScript file to programmatically create the `webhook_bap_config` table in the database if it doesn't exist, and inserts a default configuration upon application startup in production environments. 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
4ef702f44b
commit
5b338b224e
2 files changed
+65
-2
No files matched your search
+5
-2
@@ -2,8 +2,11 @@ import express, { type Request, Response, NextFunction } from "express";
|
||||
import { registerRoutes } from "./routes.js";
|
||||
import { setupVite, serveStatic } from "./vite.js";
|
||||
|
||||
// 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');
|
||||
// Forcer la création de la table webhook_bap_config au démarrage de l'application
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
const { ensureWebhookBapConfigTable } = await import('./createWebhookTable.js');
|
||||
await ensureWebhookBapConfigTable();
|
||||
}
|
||||
|
||||
// Initialize weather system
|
||||
console.log('🌤️ [STARTUP] Initializing weather system...');
|
||||
|
||||
Reference in new issue
Block a user