yiimigrate

Simple migrate сommand supporting modules
6 followers

yiimigrate

Migrate сommand supporting modules for Yii 1.1

Install

composer.json:

{
  "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

Resources

Project on github.com

Total 3 comments

#15184 report it
schmunk at 2013/10/15 10:13pm
"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.

#14984 report it
Petr.Grishin at 2013/09/26 05:45am
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.

Leave a comment

Please to leave your comment.

Create extension