There's a situation that I run into a lot:
- I create a migration
- It turns out that migration should add an extra column
- I update the migration's up clause to add the column, and the down column to remove it.
- When I run
mite down, I get a SQL error telling me that it can't find the column I added (naturally).
We should add a -f or --force flag to mite down to ignore errors and continue to migrate down.
Alternatively, maybe just a mite reset command would be more appropriate? Something that would run all the down migrations (ignoring any errors), truncate the _migrations table, then run the ups? That's what I find myself doing whenever I encounter this problem.
There's a situation that I run into a lot:
mite down, I get a SQL error telling me that it can't find the column I added (naturally).We should add a
-for--forceflag tomite downto ignore errors and continue to migrate down.Alternatively, maybe just a
mite resetcommand would be more appropriate? Something that would run all the down migrations (ignoring any errors), truncate the _migrations table, then run the ups? That's what I find myself doing whenever I encounter this problem.