MichaelLuthor
MichaelLuthor

Reputation: 436

How to modify the base class of the class builded by "yiic migrate create XXX"?

All

I am using "yiic migrate" to setup my database, But I got a problem, for example, $ ./yiic migrate create create_table_user

then, I got a class like this :

class m130918_015910_create_table_weddings extends CDbMigration
{
    // something else 
}

But I want it to be like this :

class m130918_015910_create_table_weddings extends migration_create_table
{
    // something else 
}

Is there any idea to do this ?

Oh, BTW, I searched the handbook, but nothing I got...

Upvotes: 0

Views: 48

Answers (1)

acorncom
acorncom

Reputation: 5955

Per the page on the Yii guide about migrations, you can adjust the template file used with a templateFile flag on the command line: http://www.yiiframework.com/doc/guide/1.1/en/database.migration#customizing-migration-command

Think that's what you need ...

Upvotes: 3

Related Questions