-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support namespaces in migration files. #213
Comments
From @dereuromark on April 7, 2016 13:16 If this is a limitation maybe we should always prefix with the plugin or vendor name then? |
From @thinkingmedia on April 7, 2016 13:34 I would prefix only plugins but that's a good idea. |
From @HavokInspiration on April 7, 2016 17:12 Right now, migrations can not live under a namespace. So currently, only prefixing the migration classname as @dereuromark suggested would work. |
👍 for namespaces and alike. I ran into the same issue now a few times with too short names and thus colliding with basic classes of the app. So it would be good if all migration files would be namespaced as supported by phinx. |
In addition to namespaces. I wish we could file migrations under subfolders where a folder presented a major version. I have been struggling with a large number of migration files that I don't want to throw away as I sometimes build from scratch on my dev machine, but after working on this project for several years. A single folder approach shows the a lack of scalability. |
We first need to fix up Phinx here in cakephp/phinx#168 |
From @thinkingmedia on April 7, 2016 13:8
This is a (multiple allowed):
What you did
CreateImages
.CreateImages
.Expected Behavior
The classes
CreateImages
are unrelated to each other.Actual Behavior
PhpStorm warns that the class
CreateImages
is already defined for the project. Since the migration classes do not use a namespace they exist in the same global space.Is this a limitation imposed by Phinx?
Copied from original issue: cakephp/cakephp#8603
The text was updated successfully, but these errors were encountered: