=== Database Connection Test === 1. Testing database connection... ✅ Database connection: SUCCESS 2. Listing all tables in database... 📋 Found 8 tables: - appointment_logs - appointments - availability_cache - customers - resources - sync_logs - 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 (17): id, booking_id, calendar_event_id, service_id, customer_id, start_datetime, end_datetime, status, appointment_mode, client_message, calendar_sync_status, cancellation_token, confirmation_token, confirmation_token_expires_at, created_at, updated_at, ical_uid ✅ Table 'availability_cache': EXISTS Columns (8): id, source, contact_email, slot_datetime, duration_minutes, is_available, updated_at, sync_batch_id ✅ 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: 01K97AN7Q0JSF7JQGC2HHT4Y77 ULID 2: 01K97AN7Q00VYWMS62X4B3RSDY ✅ ULID generation: WORKING (unique IDs) 5. Testing customer insertion... ✅ Customer insertion: SUCCESS (ID: 402) 6. Testing appointment insertion... ✅ Appointment insertion: SUCCESS (Booking ID: 01K97AN7Q0KZ3K1FAXTA2F4K1R) 7. Testing appointment log insertion... ✅ Appointment log insertion: SUCCESS 8. Testing data retrieval... ✅ Data retrieval: SUCCESS Booking ID: 01K97AN7Q0KZ3K1FAXTA2F4K1R Customer: Test Customer Start: 2025-11-05 14:00:00 Status: PENDING 9. Cleaning up test data... ✅ Test data cleaned up === ALL TESTS COMPLETED SUCCESSFULLY === Database: x-dev-calendrierTest Connection: Active