fix(migrations): TEXT→UUID in 028_workspace_artifacts — unblocks all E2E CI - #670
Merged
Conversation
…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>
Contributor
There was a problem hiding this comment.
QA: migration TEXT→UUID fix is correct. Verified workspaces.id is UUID PRIMARY KEY (001_workspaces.sql:2) so the FK must match — this PR fixes that type mismatch. go test ./... passes all 17 packages (0 FAIL). lib/pq driver scans UUID columns into Go string fields correctly; no handler changes needed. No other migration files conflict with 028. Approving.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migration 028 (
workspace_artifacts) declaresidandworkspace_idasTEXTwith a FK toworkspaces(id)which isUUID. Postgres rejects the FK constraint at migration time:Platform exits via
log.Fatalf→/healthnever responds → E2E smoke test times out after 30s → every open PR fails CI.Same class of bug as #646 (which fixed migration 025). Fix:
TEXT → UUIDfor bothidandworkspace_idcolumns.Impact
This has been blocking ALL open PRs for 5+ maintenance cycles. PRs #650, #651, #659, #669 all fail on the same E2E step. Once this merges, their CI re-runs should pass.
Test plan
gh run view --log-failed)🤖 Generated with Claude Code