Skip to content

phinx status prints down migrations out of order #1745

Open
@MasterOdin

Description

@MasterOdin

Adding a migration to a list of existing migrations, where its id falls between existing ones, I get:

$ bin/phinx status
Phinx by CakePHP - https://phinx.org.

using config file ./phinx.yml
using config parser yml
using migration paths
 - /Users/mpeveler/Work/Github/phinx/db/migrations
using seed paths
warning no environment specified, defaulting to: mysql
ordering by creation time

 Status  [Migration ID]  Started              Finished             Migration Name
----------------------------------------------------------------------------------
     up  20190928205056  2020-04-11 16:07:50  2020-04-11 16:07:50  Migration
     up  20200411164726  2020-04-11 16:47:59  2020-04-11 16:47:59  ThirdMigration
   down  20200411160806                                            SecondMigration

I would expect the SecondMigration to be in the middle of the two, given its id and after migrating, I get:

$ bin/phinx status
Phinx by CakePHP - https://phinx.org.

using config file ./phinx.yml
using config parser yml
using migration paths
 - /Users/mpeveler/Work/Github/phinx/db/migrations
using seed paths
warning no environment specified, defaulting to: mysql
ordering by creation time

 Status  [Migration ID]  Started              Finished             Migration Name
----------------------------------------------------------------------------------
     up  20190928205056  2020-04-11 16:07:50  2020-04-11 16:07:50  Migration
     up  20200411160806  2020-04-11 16:50:54  2020-04-11 16:50:54  SecondMigration
     up  20200411164726  2020-04-11 16:50:47  2020-04-11 16:50:47  ThirdMigration

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions