a732697855
ALTER threads_meta / runs / feedback / run_events to add nullable workspace_id String(36) + FK to workspaces (ON DELETE CASCADE) and a composite (workspace_id, user_id, updated_at) index on threads_meta for the workspace-scoped thread-list query. Downgrade reverses all four FKs, columns, and the index. Stage 0 PR5 step 1/2; revision 0003 flips NOT NULL after the backfill. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>