Skip to content
Snippets Groups Projects
Commit fb041688 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #9809 from owncloud/check-transaction-before-commit-migration-master

only commit in case a transaction is active
parents a547bf8f 363ba04f
No related branches found
No related tags found
No related merge requests found
......@@ -110,7 +110,9 @@ class Migrator {
$this->dropTable($tmpName);
} catch (DBALException $e) {
// pgsql needs to commit it's failed transaction before doing anything else
$this->connection->commit();
if ($this->connection->isTransactionActive()) {
$this->connection->commit();
}
$this->dropTable($tmpName);
throw new MigrationException($table->getName(), $e->getMessage());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment