feat(db): columns for the workspace drive (migrations only, split from #9847)
Migrations and schema only, split out of #9847 so they land before the code that reads them (packages/trpc/AGENTS.md rule 10). Draft until the coordinator says so.
What changed
- One migration,
0199_workspace_drive:cloud_workspaces.drive_name text,cloud_workspaces.drive_laid_out_at timestamptz,environments.golden_drive_name text. - The matching columns in
packages/db/src/schema/schema.ts.
All three are nullable, with no default and no index. Nothing on main reads or writes them, so there is no tRPC input or output change. On 2026-11-18 main gained its own 0197 and 0198. So the branch was rebuilt on main (e0f54faf): only the schema change was applied, and drizzle-kit generate wrote the migration as 0199 on top of main's journal. The SQL is the same three statements as before. Nothing under packages/db/drizzle/ was hand-edited.
Safety checklist (.agents/skills/db-migrations/SKILL.md)
- Production sizes, read-only on the Neon default branch on 2026-11-17:
cloud_workspaces9,680 kB (~6,649 rows),environments232 kB (~258 rows). - No column type change.
- No foreign keys, so no lock order to get wrong.
- No long ACCESS EXCLUSIVE:
ADD COLUMNwith no default is a catalog-only change; the lock is held for a moment. - Every statement finishes well inside 60 seconds at these sizes.
- Rehearsal under load: not done. Not required by the skill for a catalog-only change on small tables.
- No reads move to new columns in this PR.
- No tRPC input or output change.
- After changing an already-pushed migration, the PR's preview Neon branch was deleted: not done. It needs the coordinator's OK first.
Checks
- Ran:
drizzle-kit migrateon a new Neon dev branch made from production on 2026-11-18 (dev/workspace-drive-0199, br-soft-frog-afohxaia), withlock_timeout=5sandstatement_timeout=60s. It was at 0198 before and applied 0199; the three columns exist with the expected types.biome checkon the schema file passed. - Not run: CI on this head; a rehearsal under load.
Summary by cubic
Adds three nullable DB columns for the workspace drive as a migrations-only PR, split from #9847 so they land before the code that reads them.
environments.golden_drive_nameandcloud_workspaces.drive_name(text), pluscloud_workspaces.drive_laid_out_at(timestamptz).- All columns are nullable, with no default and no index; no existing code reads or writes them.
- The
ALTER TABLEs are catalog-only, so they hold no long locks and don't change existing behavior.