smigrationcommand Module Wise Migration

  1. Requirements
  2. Usage
  3. Resources

This is an extension of base Migration Command to provide functionality to have migrations in modules and apply/undo those migrations modules wise.

Requirements

Yii 1.1

Usage

  1. Put the SMigrationCommand.php file to ~protected/commands folder.
  2. add below snippet to ~config/console.php.
return array(
...
...
'commandMap' => array(
        'migrate' => array(
            'class' => 'application.commands.SMigrationCommand',
        )
    ),
...

Always put normal migration scripts in ~protected/migrations folder and module migrations in ~protected/modules/nameofmodule/migrations.

now open CMD/terminal CD to ~protected. invoke command yiic migrate [up|down] [...] for normal migrations AND yiic migrate module [up|down] [...] for module migrations

Only migrate create,migrate up and migrate down is working currently. Will upgrade gradually.

Resources

https://github.com/KITSChandrakantaPal/SMigrationCommand.git

0 0
3 followers
106 downloads
Yii Version: 1.1
License: MIT
Category: Database
Developed by: Chandrakanta
Created on: May 4, 2014
Last updated: 10 years ago

Downloads

show all

Related Extensions