mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-19 13:08:23 +02:00
Create announcement table to fix production database errors
Create the 'announcements' table in the production PostgreSQL database using a SQL script to resolve "relation 'announcements' does not exist" errors. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e437ffed-c31b-44eb-9fd5-b6f9faa8e7ce Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/e437ffed-c31b-44eb-9fd5-b6f9faa8e7ce/biGr9ER
This commit is contained in:
1 parent
9a5060baa5
commit
506b7681d0
3 files changed
+315
No files matched your search
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
# Script de test d'accès à la base de données
|
||||
|
||||
echo "🔍 Test d'accès à la base de données..."
|
||||
|
||||
# Test de connexion
|
||||
echo "1. Test de connexion à la base..."
|
||||
docker exec logiflow-logiflow-1 psql "$DATABASE_URL" -c "SELECT version();" > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✅ Connexion à la base réussie"
|
||||
else
|
||||
echo "❌ Erreur de connexion à la base"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Liste des tables existantes
|
||||
echo "2. Tables existantes dans la base:"
|
||||
docker exec logiflow-logiflow-1 psql "$DATABASE_URL" -c "
|
||||
SELECT tablename
|
||||
FROM pg_tables
|
||||
WHERE schemaname = 'public'
|
||||
ORDER BY tablename;
|
||||
"
|
||||
|
||||
# Vérification spécifique de la table announcements
|
||||
echo "3. Vérification de la table announcements:"
|
||||
docker exec logiflow-logiflow-1 psql "$DATABASE_URL" -c "
|
||||
SELECT EXISTS (
|
||||
SELECT FROM information_schema.tables
|
||||
WHERE table_schema = 'public'
|
||||
AND table_name = 'announcements'
|
||||
) as announcements_exists;
|
||||
"
|
||||
|
||||
echo "✅ Test terminé!"
|
||||
Reference in new issue
Block a user