db->driverName === 'mysql') { $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; } $this->createTable('{{%importer_prefix}}', [ 'id' => $this->primaryKey(10)->notNull() . ' AUTO_INCREMENT', 'importer_id' => 'int(6) unsigned NOT NULL', 'brand' => 'varchar(100) NOT NULL', 'prefix' => 'varchar(50) NOT NULL', 'timestamp' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP', ], $tableOptions); $this->createIndex('importer_id', '{{%importer_prefix}}', 'importer_id, brand, prefix', true); } public function down() { $this->dropTable('{{%importer_prefix}}'); } /* // Use safeUp/safeDown to run migration code within a transaction public function safeUp() { } public function safeDown() { } */ }