I want to create the following table:
CREATE TABLE `srn_au_regions` ( `au_id` INT(10) UNSIGNED NOT NULL, `region_id` INT(10) UNSIGNED NOT NULL, PRIMARY KEY (`au_id`, `region_id`), INDEX `FK_srn_au_regions_am` (`au_id`), INDEX `FK_srn_au_regions_region` (`region_id`), CONSTRAINT `FK_srn_au_regions_am` FOREIGN KEY (`au_id`) REFERENCES `srn_au` (`id`) ON UPDATE CASCADE ON DELETE CASCADE, CONSTRAINT `FK_srn_au_regions_region` FOREIGN KEY (`region_id`) REFERENCES `srn_regions` (`id`) ON UPDATE NO ACTION ON DELETE NO ACTION ) COLLATE='utf8_general_ci' ENGINE=InnoDB ROW_FORMAT=DEFAULT
But I'm unable to do it with CDbMigration
I am able to create the table without primary key or with a single primary key
$this->createTable('{{au_regions}}', array(
'au_id' => 'int NOT NULL',
'region_id' => 'int NOT NULL',
));But how to create a composite primary key like PRIMARY KEY (`au_id`, `region_id`) using CDbMigration?
If CDbMigration does not allow the whole functionality of SQL then it's worthless!!!

Help

















