-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
refactored migrate command to handle multiple migrations paths #3273
Conversation
added migrationLookup property fixes #384
Note: Had to add alias to the migration table |
@@ -97,7 +102,7 @@ public function options($actionId) | |||
{ | |||
return array_merge( | |||
parent::options($actionId), | |||
['migrationPath', 'migrationTable', 'db'], // global for all actions | |||
['migrationPath', 'migrationLookup', 'migrationTable', 'db'], // global for all actions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change affect the contents of the guide here: https://github.com/yiisoft/yii2/blob/master/docs/guide/console-migrate.md#use-command-line-options
If so, can you also adjust the guide too?
I don't think we need the alias column. For issue #384, we only need to support setting |
@qiangxue But the @adamaltman Thanks for noticing. I'll update the guide when we've finished the implementation. |
When generating a migration, if there are multiple |
or perhaps he just needs to configure |
I also think that would be the best option, but then in conjunction with
Or should we specify this in the extras of the Am I right, that there's no representation of The migrate command would then merge the migration paths from |
…migrate-command Conflicts: framework/console/controllers/MigrateController.php
Broken code, too many changes. |
Made this available as an extension: https://github.com/dmstr/yii2-migrate-command |
I really want this to be in Yii 2 - I do understand that this would break existing migration dbs, but I see no reason why it can't be implemented for fresh migrations? |
🙇 @jacmoe :) |
Music in my ears @cebe 👍 |
@cebe Here's a PR dmstr/yii2-migrate-command#9 which is based more on the current Yii 2.0 code. From my side, feel free to move the stuff to the core or contact me if you like... |
added migrationLookup property
fixes #384