fix(web): stop naming plan.opened_at, ahead of the migration that drops it
Merged
DA
11d ago+69+69+01234567890123456789-10-10-01234567890123456789
What
Step 1 of 2 for dropping the unused plan.opened_at column.
apps/web/server/db/plan-schema.tsno longer declaresopenedAt. Drizzle puts every declared column in an INSERT, socreatePlanonmainstill sends"opened_at"(asdefault), even though nothing reads it.tests/drizzle-schema.test.tsgetsPENDING_DROP(plan.opened_at), which the "migrated and not declared" check skips. A new test fails on any entry the database no longer has, so the entry has to be removed in the same PR as the drop.tests/hosted-plans.test.tsgets a new block that runsalter table plan drop column opened_at, then starts, saves, lists, reads, opens a conversation on, and deletes a plan. It fails without this change (column "opened_at" of relation "plan" does not existon the insert).openedAtstays on the wire (orchestrator decision), still sent ascreatedAt. The comments inplan-store.tsandplan-wire.tsnow say when it can go: once a release that decodes it as optional has shipped and v0.7.1 is no longer supported. No desktop code reads it. The unused fixture fields inplan-actions.test.tsandvoice-service.test.tsare removed.server/README.md"The data layer" now explains that dropping a column takes two deployments.
Why two PRs
Vercel runs pnpm db:migrate during the build, while the previous deployment is still serving. If one deploy both stopped naming the column and dropped it, the running deployment's plan INSERT would fail between the migration and the promote, and keep failing if the build broke after migrating. The follow-up PR (DROP COLUMN IF EXISTS "opened_at" plus removing the PENDING_DROP entry) merges only after this commit is live in Production. The index plan_user_opened was already dropped by 0059.
Verification
./scripts/check.shexits 0.- Store and schema tests pass on PGlite in both directions.
- No UI change. CI does not build or verify the Mac app, and
./scripts/verify.shwas not run (Linux VM; LUKE-159 is the manual Mac pass).
š¤ Generated with Claude Code