From 8eaffc49aa8721e16e822c3adc7af7b9e9e8ccfc Mon Sep 17 00:00:00 2001 From: rabbitblood Date: Fri, 17 Apr 2026 02:48:08 -0700 Subject: [PATCH] =?UTF-8?q?fix(migrations):=20TEXT=E2=86=92UUID=20in=20028?= =?UTF-8?q?=5Fworkspace=5Fartifacts=20=E2=80=94=20unblocks=20all=20E2E=20C?= =?UTF-8?q?I?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- platform/migrations/028_workspace_artifacts.up.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/migrations/028_workspace_artifacts.up.sql b/platform/migrations/028_workspace_artifacts.up.sql index c6b2d422..8fb22ace 100644 --- a/platform/migrations/028_workspace_artifacts.up.sql +++ b/platform/migrations/028_workspace_artifacts.up.sql @@ -8,8 +8,8 @@ -- call POST /workspaces/:id/artifacts/token to obtain a fresh git credential. CREATE TABLE IF NOT EXISTS workspace_artifacts ( - id TEXT NOT NULL DEFAULT gen_random_uuid()::text, - workspace_id TEXT NOT NULL REFERENCES workspaces(id) ON DELETE CASCADE, + id UUID NOT NULL DEFAULT gen_random_uuid(), + workspace_id UUID NOT NULL REFERENCES workspaces(id) ON DELETE CASCADE, cf_repo_name TEXT NOT NULL, cf_namespace TEXT NOT NULL, -- remote_url is the base Git remote (without embedded credentials).