db->driverName === 'mysql') { // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; } $this->createTable( '{{%log}}', [ 'id_log' => $this->primaryKey(), 'type' => $this->integer(11), 'message' => $this->string(), 'url' => $this->text(), 'app' => $this->string(50), 'id_user' => $this->integer(11), 'id_transfer' => $this->integer(11), 'id_money_movement' => $this->integer(11), 'id_ticket' => $this->integer(11), 'id_sale' => $this->integer(11), 'id_customer' => $this->integer(11), 'id_account' => $this->integer(11), 'id_account_state' => $this->integer(11), 'id_key' => $this->integer(11), 'id_product' => $this->integer(11), 'id_door_log' => $this->integer(11), 'created_at' => $this->dateTime()->notNull(), 'updated_at' => $this->dateTime()->notNull(), ], $tableOptions ); } public function down() { $this->dropTable("{{%log}}"); } /* // Use safeUp/safeDown to run migration code within a transaction public function safeUp() { } public function safeDown() { } */ }