Skip to content

5.x: RFC - migrations reset/redo #972

@dereuromark

Description

@dereuromark

What I am missing is some kind of quick redo, when you start a fresh app and you just modified the schema.

Laravel vs CakePHP Migrations

  | Reset (rollback ALL)       | migrate:reset          | ❌ Missing          | Rollback to version 0      |
  | Refresh (reset + migrate)  | migrate:refresh        | ❌ Missing          | Convenience combo          |
  | Fresh (drop all + migrate) | migrate:fresh          | ❌ Missing          | Nuclear option             |

I dont think we need all 3, the nuclear option could suffice. what do you think?
Maybe as "redo" or "rerun":

cake migrations redo

Asking for confirmation of course!

Similar thing could be for seeds:

cake seeds redo

would truncate and redo the data.

Both are useful when developing on a new app IMO

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions