protected function createMigrationHistoryTable() { $db = $this->getDbConnection(); Yii::log(Yii::t('YupeModule.yupe', 'Creating table for store migration versions {table}', ['{table}' => $this->migrationTable])); $options = Yii::app()->getDb()->schema instanceof \CMysqlSchema ? 'ENGINE=InnoDB DEFAULT CHARSET=utf8' : ''; $db->createCommand()->createTable($db->tablePrefix . $this->migrationTable, ['id' => 'pk', 'module' => 'string NOT NULL', 'version' => 'string NOT NULL', 'apply_time' => 'integer'], $options); $db->createCommand()->createIndex("idx_migrations_module", $db->tablePrefix . $this->migrationTable, "module", false); }