Skip to content

fix(migrations): TEXT→UUID FK type mismatch blocking all E2E runs - #646

Merged
molecule-ai[bot] merged 1 commit into
mainfrom
fix/migration-025-fk-type
Apr 17, 2026
Merged

fix(migrations): TEXT→UUID FK type mismatch blocking all E2E runs#646
molecule-ai[bot] merged 1 commit into
mainfrom
fix/migration-025-fk-type

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

CRITICAL — unblocks all E2E CI

Migrations 025 (workspace_token_usage) and 026 (org_plugin_allowlist) declared FK columns as TEXT but workspaces.id is UUID. Postgres rejects the constraint, crashing the platform on boot. Every E2E run on main fails since these were merged.

Fix: TEXT → UUID on both FK columns.

🤖 Generated with Claude Code

Migrations 025 + 026 declared workspace_id/org_id as TEXT but
workspaces.id is UUID — Postgres rejects the FK constraint, crashing
every E2E run on main since these migrations were merged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@molecule-ai

molecule-ai Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Dev Lead clearance ✅ — URGENT merge

Diff verified: TEXT→UUID on both FK columns that reference workspaces(id) (which is UUID). Postgres correctly rejects TEXT FK → UUID PK constraints, so this migration crashes the platform on every boot.

File Change
025_workspace_token_usage.up.sql workspace_id TEXTworkspace_id UUID
026_org_plugin_allowlist.up.sql org_id TEXTorg_id UUID

+2/-2, no logic change, no test risk. E2E CI is blocked on main until this lands. Priority merge.

@molecule-ai
molecule-ai Bot merged commit 2ab7054 into main Apr 17, 2026
3 of 5 checks passed
HongmingWang-Rabbit added a commit that referenced this pull request Apr 17, 2026
…E2E CI

Migration 028 declared workspace_id as TEXT with a FK to workspaces(id)
which is UUID. Postgres rejects the FK: 'cannot be implemented' because
the types don't match. Same class of bug as #646 (which fixed 025).

This has been blocking ALL open PRs' E2E API Smoke Test for 5+ cycles
(since 028 was introduced in #641 Cloudflare Artifacts). Every PR CI
run applies all migrations from scratch → hits this → platform exits
with log.Fatalf → /health never responds → 30s timeout → FAIL.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
molecule-ai Bot added a commit that referenced this pull request Apr 21, 2026
Merge gate passed. +2/-2 FK type fix: workspace_id TEXT→UUID in 025, org_id TEXT→UUID in 026 — matches workspaces.id (UUID PK). Schema migration — CEO explicit authorization in chat (boot-blocker/urgent). UNSTABLE = known App token scope gap.
molecule-ai Bot pushed a commit that referenced this pull request Apr 21, 2026
…E2E CI

Migration 028 declared workspace_id as TEXT with a FK to workspaces(id)
which is UUID. Postgres rejects the FK: 'cannot be implemented' because
the types don't match. Same class of bug as #646 (which fixed 025).

This has been blocking ALL open PRs' E2E API Smoke Test for 5+ cycles
(since 028 was introduced in #641 Cloudflare Artifacts). Every PR CI
run applies all migrations from scratch → hits this → platform exits
with log.Fatalf → /health never responds → 30s timeout → FAIL.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@HongmingWang-Rabbit
HongmingWang-Rabbit deleted the fix/migration-025-fk-type branch April 24, 2026 00:11
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.

1 participant