aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/MySQLMigrator.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/DB/MySQLMigrator.php')
-rw-r--r--lib/private/DB/MySQLMigrator.php38
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/private/DB/MySQLMigrator.php b/lib/private/DB/MySQLMigrator.php
index e178cfb55d8..fe56a9563e2 100644
--- a/lib/private/DB/MySQLMigrator.php
+++ b/lib/private/DB/MySQLMigrator.php
@@ -53,25 +53,25 @@ class MySQLMigrator extends Migrator {
return $schemaDiff;
}
- /**
- * Speed up migration test by disabling autocommit and unique indexes check
- *
- * @param \Doctrine\DBAL\Schema\Table $table
- * @throws \OC\DB\MigrationException
- */
- protected function checkTableMigrate(Table $table) {
- $this->connection->exec('SET autocommit=0');
- $this->connection->exec('SET unique_checks=0');
+ /**
+ * Speed up migration test by disabling autocommit and unique indexes check
+ *
+ * @param \Doctrine\DBAL\Schema\Table $table
+ * @throws \OC\DB\MigrationException
+ */
+ protected function checkTableMigrate(Table $table) {
+ $this->connection->exec('SET autocommit=0');
+ $this->connection->exec('SET unique_checks=0');
- try {
- parent::checkTableMigrate($table);
- } catch (\Exception $e) {
- $this->connection->exec('SET unique_checks=1');
- $this->connection->exec('SET autocommit=1');
- throw new MigrationException($table->getName(), $e->getMessage());
- }
- $this->connection->exec('SET unique_checks=1');
- $this->connection->exec('SET autocommit=1');
- }
+ try {
+ parent::checkTableMigrate($table);
+ } catch (\Exception $e) {
+ $this->connection->exec('SET unique_checks=1');
+ $this->connection->exec('SET autocommit=1');
+ throw new MigrationException($table->getName(), $e->getMessage());
+ }
+ $this->connection->exec('SET unique_checks=1');
+ $this->connection->exec('SET autocommit=1');
+ }
}