phinx icon indicating copy to clipboard operation
phinx copied to clipboard

Allow a count for rollback/migrate.

Open rquadling opened this issue 11 years ago • 10 comments

Hi.

A feature request.

I'm doing some incremental development, but I need to be able to test things backwards and forwards through the migrations.

Currently, I have to track which timestamp to use as my target, but I can see it is always 3 migrations (or 4, 5, etc. as I develop).

A new option of --count (-o) Number of migrations to process would be useful for this.

Regards,

Richard Quadling.

rquadling avatar Jun 03 '14 11:06 rquadling

:+1:

ipoz avatar Jun 23 '15 09:06 ipoz

Now I'm more familiar with Phinx, I'll create a feature branch for a PR later this (or early next) week.

rquadling avatar Jun 23 '15 10:06 rquadling

Having used MyBatis Migrations before, they're doing the following:

The up command runs the do section of all pending migrations in order, one after the other. The down command runs the undo section of the last applied migration only. http://mybatis.github.io/migrations/updown.html

while specifying the number of migrations to run is obviously fine as well, i've seen this behavior used by multiple migration libraries .. so we should probably go for that?

steffkes avatar Aug 23 '15 10:08 steffkes

I'm no longer sure this is a useful feature for me as I developed the breakpoint feature https://github.com/rquadling/phinx/tree/feature/BreakpointSupport / https://github.com/robmorgan/phinx/pull/497 which is what I really needed.

Waiting on some feedback from Phinx management on this.

rquadling avatar Aug 24 '15 16:08 rquadling

I see this as pretty low priority.

robmorgan avatar Sep 02 '15 14:09 robmorgan

The current timestamps without autocomplete are sure not nice to work with. A different way, like this count sure could be more user friendly.

dereuromark avatar Apr 11 '20 06:04 dereuromark

Closing due to lack of activity or out of scope. If there is new interest, please open a PR.

othercorey avatar May 09 '20 00:05 othercorey

@othercorey could this be re-opened?

MasterOdin avatar May 11 '20 03:05 MasterOdin

@MasterOdin Do we need to keep this open? It is useful, but it seems there is no interest in adding it. Once a PR here is done in the future, that would still be fine. But tickets like these seem to be just dead ones.

dereuromark avatar Oct 23 '20 22:10 dereuromark