Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Migration fails due wrong sort index #48

Open
Charles68 opened this Issue · 0 comments

1 participant

Charles68
Charles68

To reproduce the issue:
Create one migration version with numeric and the 17 versions with alphanumeric names for example:

Version1.php
Version2_a.php
Version3_b.php
...
Version9_a.php
VersionA_f.php

start migration.
Add a new migration with VersionX_x.php and start migration again. The migration command starts a rollback to Version1.php.
The problem is in file:
/var/www/projects/hcontent/vendor/doctrine/migrations/lib/Doctrine/DBAL/Migrations/Configuration/Configuration.php is the ksort function in method registerMigration. The ksort seems to handle the value "1" from Version1 as a numeric value and put it to the end of the sorted array. The solution of the problem is to add the optional parameter SORT_STRING to the ksort function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.