Extended Migration Command

This extension is an enhanced version of the Yii Database Migration Tool that adds module support and many more usefull features. If there is anything you would like to have added, or you found a bug please report it on google code or contact me via email.

Features

Resources

Requirements

Installation

'commandMap' => array(
        'migrate' => array(
            // alias of the path where you extracted the zip file
            'class' => 'application.extensions.yiiext.commands.migrate.EMigrateCommand',
            // this is the path where you want your core application migrations to be created
            'migrationPath' => 'application.db.migrations',
            // the name of the table created in your database to save versioning information
            'migrationTable' => 'tbl_migration',
            // the application migrations are in a pseudo-module called "core" by default
            'applicationModuleName' => 'core',
            // define all available modules
            'modulePaths' => array(
                'admin'      => 'application.modules.admin.db.migrations',
                'user'       => 'application.modules.user.db.migrations',
                'yourModule' => 'application.any.other.path.possible',
                // ...
            ),
            // here you can configrue which modules should be active, you can disable a module by adding its name to this array
            'disabledModules' => array(
                'admin', 'anOtherModule', // ...
            ),
            // the name of the application component that should be used to connect to the database
            'connectionID'=>'db',
            // alias of the template file used to create new migrations
            'templateFile'=>'application.db.migration_template',
        ),
    ),

Please note: if you already used MigrateCommand before, make sure to add the module column to your migrationTable:

ALTER TABLE `tbl_migration` ADD COLUMN `module` varchar(32) DEFAULT NULL;
 UPDATE `tbl_migration` SET module='core';

Usage


© 2009 — 2011, yiiext team.