chore(db): drop orphaned import_* columns from user_table_definitions
Merged
WA
2mo ago+20337+20337+01234567890123456789012345678901234567890123456789-0-0-0123456789
Summary
- Drops the five orphaned
import_*columns fromuser_table_definitions—import_status,import_id,import_error,import_rows_processed,import_started_at - This is the contract phase of the table-jobs cutover. Migration
0233moved import job state intotable_jobsand removed every application read and write, but deliberately left the columns in place so the then-deployed app version kept working across blue/green cutover. The follow-up drop was never written, and nocontract-pendingmarker was left to track it - The columns have been invisible to Drizzle ever since: the model lost them in the same release, so every meta snapshot from
0233onward already omits them anddrizzle-kit generatereports no diff. They exist only physically, which is why this is a custom migration schema.tsis intentionally untouched — it has been correct since the cutover; only the database was stale
Type of Change
- Chore / cleanup
Testing
- Verified zero references to any of the five column names (snake_case or camelCase) anywhere outside
packages/db/migrations - Confirmed all five columns are empty across every row in production, and that nothing depends on them — no index, constraint, view, rule, trigger, function, publication, or generated column
- Diffed every table's column count against the Drizzle snapshot:
user_table_definitionsis the only table with model/database drift - Idempotency tested against a scratch Postgres — ran the migration three times, clean each run, row data intact. Single
ALTERwithDROP COLUMN IF EXISTSclauses, so one lock acquisition and a no-op replay after alock_timeoutretry bun run check:migrations origin/staging✓,bun run lint✓,bun run check:audits(37 audits) ✓
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing
- No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)