Skip to content

Fix V77/V78 migration crashes when UUID columns are missing#393

Merged
ddon merged 1 commit intoBeamLabEU:devfrom
alexdont:dev
Mar 6, 2026
Merged

Fix V77/V78 migration crashes when UUID columns are missing#393
ddon merged 1 commit intoBeamLabEU:devfrom
alexdont:dev

Conversation

@alexdont
Copy link
Contributor

@alexdont alexdont commented Mar 6, 2026

V56 conditionally adds UUID columns but skips tables that don't exist yet. V77 and V78 assumed these columns always exist, causing hard crashes on upgrades where optional modules were enabled after V56 ran.

V77: detect whether role_uuid exists via information_schema and fall back to id/role_id columns when it doesn't.

V78: check if uuid column exists on ai_prompts before creating the FK constraint, backfilling it with V56's idempotent pattern if missing.

V56 conditionally adds UUID columns but skips tables that don't exist
yet. V77 and V78 assumed these columns always exist, causing hard
crashes on upgrades where optional modules were enabled after V56 ran.

V77: detect whether role_uuid exists via information_schema and fall
back to id/role_id columns when it doesn't.

V78: check if uuid column exists on ai_prompts before creating the FK
constraint, backfilling it with V56's idempotent pattern if missing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ddon ddon merged commit b2516e8 into BeamLabEU:dev Mar 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants