diff --git a/migrations/m190419_143225_change_search_index_table_to_innodb.php b/migrations/m190419_143225_change_search_index_table_to_innodb.php new file mode 100644 index 0000000..0edfaf8 --- /dev/null +++ b/migrations/m190419_143225_change_search_index_table_to_innodb.php @@ -0,0 +1,47 @@ +db->createCommand() + ->setSql('ALTER TABLE searchindex ENGINE = InnoDB;') + ->execute(); + } catch (Exception $exception) { + echo $exception; + return false; + } + + return true; + } + + /** + * @inheritdoc + */ + public function safeDown() + { + try { + $this->db->createCommand() + ->setSql('ALTER TABLE searchindex ENGINE = MyISAM;') + ->execute(); + } catch (Exception $exception) { + echo $exception; + return false; + } + + return true; + } +}