diff --git a/attached_assets/{95778F6E-A507-468E-A4F1-6FA3F8A77ECB}_1757341993547.png b/attached_assets/{95778F6E-A507-468E-A4F1-6FA3F8A77ECB}_1757341993547.png new file mode 100644 index 0000000..4472500 Binary files /dev/null and b/attached_assets/{95778F6E-A507-468E-A4F1-6FA3F8A77ECB}_1757341993547.png differ diff --git a/sql/test_server_connection.sql b/sql/test_server_connection.sql new file mode 100644 index 0000000..3e40985 --- /dev/null +++ b/sql/test_server_connection.sql @@ -0,0 +1,32 @@ +-- 🔍 TEST DE DIAGNOSTIC COMPLET +-- Vérifiez que tout fonctionne côté base de données + +-- 1. La table existe-t-elle vraiment ? +SELECT COUNT(*) as table_count +FROM information_schema.tables +WHERE table_name = 'avoirs' AND table_schema = 'public'; + +-- 2. Test d'insertion manuelle pour voir si ça marche +INSERT INTO avoirs ( + supplier_id, + group_id, + invoice_reference, + amount, + comment, + commercial_processed, + created_by +) VALUES ( + 1, -- Remplacez par un ID supplier existant + 1, -- Remplacez par un ID group existant + 'TEST-MANUEL-' || EXTRACT(EPOCH FROM NOW()), + 25.99, + 'Test diagnostic manuel', + false, + 'admin' -- Remplacez par un user_id existant +) RETURNING id, created_at; + +-- 3. Vérifiez le résultat +SELECT COUNT(*) as total_avoirs FROM avoirs; + +-- 4. Supprimez le test +DELETE FROM avoirs WHERE comment = 'Test diagnostic manuel'; \ No newline at end of file