From 7bcabf9ffefa6b5869465fded6c571b729789e7f Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Wed, 7 Sep 2016 16:00:13 -0500 Subject: [PATCH] Change tables engine to InnoDB - refs BT#1588 --- .../Schema/V111/Version20160907150300.php | 215 ++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 app/Migrations/Schema/V111/Version20160907150300.php diff --git a/app/Migrations/Schema/V111/Version20160907150300.php b/app/Migrations/Schema/V111/Version20160907150300.php new file mode 100644 index 0000000000..25e0b4c7c2 --- /dev/null +++ b/app/Migrations/Schema/V111/Version20160907150300.php @@ -0,0 +1,215 @@ +names as $name) { + if (!$schema->hasTable($name)) { + continue; + } + + $this->addSql("ALTER TABLE $name ENGINE=InnoDB"); + } + } + + /** + * @param Schema $schema + * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Schema\SchemaException + */ + public function down(Schema $schema) + { + foreach ($this->names as $name) { + if (!$schema->hasTable($name)) { + continue; + } + + $this->addSql("ALTER TABLE $name ENGINE=MyISAM"); + } + } +}