- Batch 1 (Foundation): sites, campaign_masters, 5 independent tables - Batch 2 (Walls): 7 first-level children - Batch 3 (Roof): link_targets - Directus UI: Auto-configure dropdowns for all foreign keys - Fix template bug: campaign_name → name - Proper dependency ordering prevents constraint failures
CRITICAL FIXES: - Added 'sites' table (SUPER PARENT) - referenced by 10+ tables - Added 'campaign_masters' table - referenced by 3 tables - Fixed field names: campaign → campaign_id, site → site_id - Organized schema into dependency batches (Batch 1→2→3) This fixes the root cause of foreign key constraint failures.