yiimigrate ¶
Migrate сommand supporting modules for Yii 1.1
Install ¶
composer.json: ~~~ [javascript] { "require": {
"petrgrishin/yiimigrate": "dev-master"
} } ~~~
config:
<?php
return array(
'commandMap' => array(
'migrate' => array(
'class' => \Command\MigrateCommand::className(),
),
),
);
Usage ¶
Applies ALL new migrations including migrate all registred application modules: ~~~ php yiic migrate up ~~~
Applies new migrations only for the selected module: ~~~ php yiic migrate up --module=moduleNameInConfiguration ~~~
Creates a new migration for the selected module: ~~~ php yiic migrate create migrateName --module=moduleNameInConfiguration ~~~
User Contributed Notes 3
dup
there is already even more flexible solution provided by samdark: http://yiiext.github.io/extensions/migrate-command/index.html
forum: http://www.yiiframework.com/forum/index.php/topic/9814-yiiext/pagep48321hlyiiext#entry48321
EMigrateCommand
— I am not able to run the application migration for all connected modules without their listings;
— just because of the very large nesting code in methods EMigrateCommand could not understand, builds EMigrateCommand all migration in chronological order.
"builds EMigrateCommand all migration in chronological order."
That's a very important feature, eg. if you have foreign keys and column changes in your migrations.
Leave a comment
If you have any questions, please ask in the forum instead.
Join the conversation to share a note.