#!/usr/bin/env php === X.1.2: Gala-Order Happy Path Integration Tests === Database: globalgala_2026_dev Event ID: 1 Mock Order Count: 50 Cleaning up previous test data... Done. ✓ Test 1: Feature flag enables Gala domain reading ✓ Test 2: GalaReadInterface returns Event data ✗ Test 3: GalaReadInterface returns capacity summary → SQLSTATE[42S22]: Column not found: 1054 Unknown column 'seat_reservations.deleted_at' in 'WHERE' (SQL: select count(*) as aggregate from `seat_reservations` where `event_id` = 1 and `status` in (booked, shadow_sold) and `seat_reservations`.`deleted_at` is null) ✗ Test 4: Create 50 mock orders reading Gala pricing → SQLSTATE[42S22]: Column not found: 1054 Unknown column 'tax_rate_snapshot' in 'INSERT INTO' (SQL: insert into `orders` (`event_id`, `session_id`, `order_reference`, `customer_name`, `customer_email`, `customer_phone`, `total_amount`, `status`, `payment_status`, `payment_method`, `payment_mode`, `idempotency_key`, `include_booking_fee`, `include_tax`, `tax_rate_snapshot`, `public_id`, `updated_at`, `created_at`) values (1, X12_TEST_0efdb2b1-0464-460f-b2f4-32ec57f0e498, X12-6XRPS5ZV, John Doe, customer0@test-x12.example.com, +447700900000, 1450, paid, paid, card, immediate, ad8a640b-7226-405c-b6ff-793394e491e3, 1, 1, 0.21, 8ff046c0-c4c3-4b97-9685-5d69278e378c, 2026-10-27 15:22:42, 2026-10-27 15:22:42)) ✗ Test 5: Availability calculated correctly (1517 - 50 = 1467) → SQLSTATE[42S22]: Column not found: 1054 Unknown column 'seat_reservations.deleted_at' in 'WHERE' (SQL: select count(*) as aggregate from `seat_reservations` where `event_id` = 1 and `status` in (booked, shadow_sold) and `seat_reservations`.`deleted_at` is null) ✗ Test 6: Payment status fields captured correctly → Count: 0, StatusPaid: 1, PaymentPaid: 1 ✗ Test 7: Order status separate from Gala status → No test orders found - Test 4 may have failed ✗ Test 8: GalaAvailabilityService counts sold seats → SQLSTATE[42S22]: Column not found: 1054 Unknown column 'seat_reservations.deleted_at' in 'WHERE' (SQL: select count(*) as aggregate from `seat_reservations` where `event_id` = 1 and `status` in (booked, shadow_sold) and `seat_reservations`.`deleted_at` is null) === Test Cleanup === Test data cleaned up. === Test Summary === Passed: 2 Failed: 6 Total: 8