620926b834
On a deployment that already had >=2 projects when migration 029 ran, 029 seeds the default project's collection id as the project id (e.g. 'ohm'), but the registry mirror expects 'default' -> it inserted a duplicate empty 'default' collection, orphaning the entries. Adds projects.reconcile_default_collection_id() -- the collection-grain twin of restamp_default_project -- run at startup BEFORE the mirror so it merges onto the canonical 'default' collection instead of duplicating. Renames the divergent collection id and cascades collection_id across all keyed tables (FK-off atomic rename + foreign_key_check). Idempotent; no-op on fresh / single-project / already-aligned deploys. Seam tests show the duplicate forms without the fix and merges with it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>