mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-16 11:46:21 +02:00
Add SQL script to create missing webhook configuration table
Add SQL script `fix-webhook-bap-FINAL.sql` and shell script `scripts/manual-create-webhook-table.sh` to address the `relation "webhook_bap_config" does not exist` error by creating and populating the `webhook_bap_config` table. 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
ac9622233a
commit
4ef702f44b
3 files changed
+298
No files matched your search
@@ -0,0 +1,41 @@
|
||||
-- Script SQL DEFINITIF à exécuter manuellement sur votre base PostgreSQL de production
|
||||
-- Usage: psql -U postgres -d votre_base -f fix-webhook-bap-FINAL.sql
|
||||
|
||||
-- Vérifier si la table existe déjà
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT FROM information_schema.tables WHERE table_schema='public' AND table_name='webhook_bap_config') THEN
|
||||
RAISE NOTICE 'Création de la table webhook_bap_config...';
|
||||
|
||||
CREATE TABLE webhook_bap_config (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name VARCHAR(100) NOT NULL DEFAULT 'Configuration BAP',
|
||||
webhook_url TEXT NOT NULL,
|
||||
description TEXT,
|
||||
is_active BOOLEAN NOT NULL DEFAULT true,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Insérer la configuration par défaut
|
||||
INSERT INTO webhook_bap_config (name, webhook_url, description, is_active)
|
||||
VALUES (
|
||||
'Configuration BAP',
|
||||
'https://workflow.ffnancy.fr/webhook/a3d03176-b72f-412d-8fb9-f920b9fbab4d',
|
||||
'Configuration par défaut pour envoi des fichiers BAP vers n8n',
|
||||
true
|
||||
);
|
||||
|
||||
-- Commentaire sur la table
|
||||
COMMENT ON TABLE webhook_bap_config IS 'Configuration pour webhook BAP n8n';
|
||||
|
||||
RAISE NOTICE 'Table webhook_bap_config créée avec succès!';
|
||||
ELSE
|
||||
RAISE NOTICE 'Table webhook_bap_config existe déjà.';
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
-- Vérification finale
|
||||
SELECT 'Vérification: Table webhook_bap_config' AS check_table;
|
||||
SELECT COUNT(*) AS nb_configs FROM webhook_bap_config;
|
||||
SELECT * FROM webhook_bap_config;
|
||||
Reference in new issue
Block a user