Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/db/migrator.php')
-rw-r--r--lib/private/db/migrator.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/db/migrator.php b/lib/private/db/migrator.php
index 6443cf4ed48..d05f8455551 100644
--- a/lib/private/db/migrator.php
+++ b/lib/private/db/migrator.php
@@ -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());
}