How we alter Table to add Unique Index?
How we alter Table to add Unique Index?
like
ALTER TABLE db.table ADD UNIQUE combineIndex ( column1 , column2 )
how we write above query in YII migrations ?
Try this method: http://www.yiiframework.com/doc/api/1.1/CDbMigration#createIndex-detail
Also you can always execute raw sql inside migration:
$this->execute("ALTER TABLE ...");
Thanx Andy.