You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
During development, it's common to iteratively build up a schema migration while adding multiple tables for a new feature. Currently, without an ability to rollback a migration, the only options are to create many small migrations (which greatly bloats a codebase) or manually remove any tables / columns added by the migration before deleting and recreating.
Describe the solution you'd like
It would be nice if migrations were generated with a rollback.sql file which could be executed if the developer indicates a specific target migration from their history.
Which would rollback [timestamp-02]-first-feature, allowing the developer to delete that directory, update their models' yaml files, and recreate the migration.
Additional considerations
Obviously, this feature would require additional logic to generate the DROP TABLE or ALTER SCHEMA [table] DROP [columns] queries, but I think this would be quite valuable.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
During development, it's common to iteratively build up a schema migration while adding multiple tables for a new feature. Currently, without an ability to rollback a migration, the only options are to create many small migrations (which greatly bloats a codebase) or manually remove any tables / columns added by the migration before deleting and recreating.
Describe the solution you'd like
It would be nice if migrations were generated with a
rollback.sql
file which could be executed if the developer indicates a specific target migration from their history.Assuming a migration history of:
While working on that "first feature", a developer might realize they missed a column and could run:
Which would rollback
[timestamp-02]-first-feature
, allowing the developer to delete that directory, update their models' yaml files, and recreate the migration.Additional considerations
Obviously, this feature would require additional logic to generate the
DROP TABLE
orALTER SCHEMA [table] DROP [columns]
queries, but I think this would be quite valuable.The text was updated successfully, but these errors were encountered: