Commit Graph

4 Commits

Author SHA1 Message Date
cawcenter
a74a4e946d Refactor Directus types: rename to schemas.ts, fix imports, and resolve type errors 2025-12-14 12:48:08 -05:00
cawcenter
99f406e998 schema: implement Golden Schema with Harris Matrix ordering + Directus UI config
- 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
2025-12-14 12:21:17 -05:00
cawcenter
29337e8f42 fix: add missing parent tables and correct field names in schema
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.
2025-12-14 12:15:06 -05:00
cawcenter
7b95b7251d feat: complete database schema with all 39 tables and foreign key relationships 2025-12-14 10:16:01 -05:00