=== Database Connection Test === 1. Testing database connection... ✅ Database connection: SUCCESS 2. Listing all tables in database... 📋 Found 7 tables: - appointment_logs - appointments - availability_cache - customers - resources - sync_state - webhook_events 3. Checking expected table structure... ✅ Table 'customers': EXISTS Columns (6): id, email, phone, first_name, last_name, created_at ✅ Table 'appointments': EXISTS Columns (13): id, booking_id, calendar_event_id, service_id, customer_id, start_datetime, end_datetime, status, calendar_sync_status, cancellation_token, created_at, updated_at, ical_uid ✅ Table 'availability_cache': EXISTS Columns (7): id, service_id, slot_start, slot_end, source, version, updated_at ✅ Table 'sync_state': EXISTS Columns (6): id, provider, resource, sync_cursor, subscription_id, expires_at ✅ Table 'appointment_logs': EXISTS Columns (6): id, booking_id, level, message, context, created_at ✅ Table 'webhook_events': EXISTS Columns (5): id, provider, event_type, payload, received_at 4. Testing ULID generation... ULID 1: 01K57C3T7RYMX8FGXV12FBHBE2 ULID 2: 01K57C3T7RZBV3Y2Z7DWMQQYGP ✅ ULID generation: WORKING (unique IDs) 5. Testing customer insertion... ✅ Customer insertion: SUCCESS (ID: 322) 6. Testing appointment insertion... ✅ Appointment insertion: SUCCESS (Booking ID: 01K57C3T7R2WHDM3EV70SWPTW4) 7. Testing appointment log insertion... ✅ Appointment log insertion: SUCCESS 8. Testing data retrieval... ✅ Data retrieval: SUCCESS Booking ID: 01K57C3T7R2WHDM3EV70SWPTW4 Customer: Test Customer Start: 2025-09-16 14:00:00 Status: PENDING 9. Cleaning up test data... ✅ Test data cleaned up === ALL TESTS COMPLETED SUCCESSFULLY === Database: x-dev-calendrierTest Connection: Active