Skip to content

"Force" option for mite down #46

@notduncansmith

Description

@notduncansmith

There's a situation that I run into a lot:

  1. I create a migration
  2. It turns out that migration should add an extra column
  3. I update the migration's up clause to add the column, and the down column to remove it.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions