You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If using multiple migration paths, only the chosen path at migration creation time is verified for the class name being unique, not all the other migration paths.
As such, the duplication is only realised when all the migrations are interacted with, say via a phinx status call.
Possibly/probably also true for using multiple seed paths.
$ bin/phinx create Number1
Phinx by Rob Morgan - https://phinx.org. 0.8.0
using config file ./phinx.yml
using config parser yaml
using migration paths
- /Users/richardquadling/dev/php/robmorgan/db/migrations/1-Tables
- /Users/richardquadling/dev/php/robmorgan/db/migrations/2-Views
using seed paths
Which migrations path would you like to use?
[0] /Users/richardquadling/dev/php/robmorgan/db/migrations/1-Tables
[1] /Users/richardquadling/dev/php/robmorgan/db/migrations/2-Views
> 0
using migration base class Phinx\Migration\AbstractMigration
using default template
created /db/migrations/1-Tables/20170306121851_number1.php
$ bin/phinx create Number1
Phinx by Rob Morgan - https://phinx.org. 0.8.0
using config file ./phinx.yml
using config parser yaml
using migration paths
- /Users/richardquadling/dev/php/robmorgan/db/migrations/1-Tables
- /Users/richardquadling/dev/php/robmorgan/db/migrations/2-Views
using seed paths
Which migrations path would you like to use?
[0] /Users/richardquadling/dev/php/robmorgan/db/migrations/1-Tables
[1] /Users/richardquadling/dev/php/robmorgan/db/migrations/2-Views
> 1
using migration base class Phinx\Migration\AbstractMigration
using default template
created /db/migrations/2-Views/20170306121857_number1.php
$ bin/phinx status
Phinx by Rob Morgan - https://phinx.org. 0.8.0
using config file ./phinx.yml
using config parser yaml
using migration paths
- /Users/richardquadling/dev/php/robmorgan/db/migrations/1-Tables
- /Users/richardquadling/dev/php/robmorgan/db/migrations/2-Views
using seed paths
warning no environment specified, defaulting to: development
ordering by creation time
[InvalidArgumentException]
Migration "20170306121857_number1.php" has the same name as "20170306121851_number1.php"
status [-c|--configuration CONFIGURATION] [-p|--parser PARSER] [-e|--environment ENVIRONMENT] [-f|--format FORMAT]
The text was updated successfully, but these errors were encountered:
I think independently of namespaces, even with multiple directories, the class name must be unique across all paths. Currently, the isUniqueMigrationClassName() call supplies a class and a path and only verifies that the class is unique in that path. All paths should be examined.
If using multiple migration paths, only the chosen path at migration creation time is verified for the class name being unique, not all the other migration paths.
As such, the duplication is only realised when all the migrations are interacted with, say via a
phinx status
call.Possibly/probably also true for using multiple seed paths.
With a
phinx.yml
ofAnd the following steps.
The text was updated successfully, but these errors were encountered: