Repository navigation
chore(db): drop orphaned import_* columns from user_table_definitions - #7188
Conversation
Contract phase for the table-jobs cutover. Migration 0233 moved import job state into table_jobs and removed every application read and write, but deliberately left the five import_* columns in place so the then-deployed app version kept working across blue/green cutover. The follow-up drop was never written. The columns have been invisible to Drizzle ever since: the model lost them in the same release, so every meta snapshot from 0233 onward already omits them and `drizzle-kit generate` reports no diff. They exist only physically, which is why this is a custom migration.
There was a problem hiding this comment.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
Greptile SummaryThis PR completes the table-jobs cutover by dropping five obsolete import-state columns that have already been removed from the application schema and moved to
Confidence Score: 5/5The PR appears safe to merge because the removed columns have no remaining repository consumers and the migration is guarded, replay-safe, and fail-closed for unexpected dependencies. Migration 0233 moved import state into
|

Summary
import_*columns fromuser_table_definitions—import_status,import_id,import_error,import_rows_processed,import_started_at0233moved 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 it0233onward already omits them anddrizzle-kit generatereports no diff. They exist only physically, which is why this is a custom migrationschema.tsis intentionally untouched — it has been correct since the cutover; only the database was staleType of Change
Testing
packages/db/migrationsuser_table_definitionsis the only table with model/database driftALTERwithDROP COLUMN IF EXISTSclauses, so one lock acquisition and a no-op replay after alock_timeoutretrybun run check:migrations origin/staging✓,bun run lint✓,bun run check:audits(37 audits) ✓Checklist