ReviewOS

stacks/bun-query-builder

Reversible migration rollback (generate + run down/inverse DDL)

#1048
Closed glennmichael123 opened this 22 days ago · 0 comments
22 days ago

Summary

migrateRollback only deletes rows from the migrations table and unlinks the file, then prints "run migrate:fresh to actually reverse schema" — no down/reverse DDL is generated or executed. Since migrate-generate already diffs models→DDL, generating inverse DDL (DROP TABLE / DROP COLUMN / reverse ALTER) for true rollback is the natural extension.

Effort: M (diff infra exists in src/migrations.ts). Location: src/actions/migrate-rollback.ts. High value — data-safe rollback is a core ORM expectation. Found via internal code audit.

Sign in to comment on this issue.