diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-03-17 17:28:36 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-03-17 17:28:36 +0100 |
commit | 82f0bcce30329df723001b0d08c62d4f0af3afc1 (patch) | |
tree | f6daa92c66801368c6229e4d6dd4d6491a0b1152 | |
parent | 947e03aab51493a860778a541b31f991006bf6ff (diff) | |
download | nextcloud-server-82f0bcce30329df723001b0d08c62d4f0af3afc1.tar.gz nextcloud-server-82f0bcce30329df723001b0d08c62d4f0af3afc1.zip |
Also fix sequences in schemachange
-rw-r--r-- | lib/db/schema.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/db/schema.php b/lib/db/schema.php index 7a1ec204044..8941881d4ea 100644 --- a/lib/db/schema.php +++ b/lib/db/schema.php @@ -53,6 +53,12 @@ class OC_DB_Schema { $fromSchema->dropTable($table->getName()); } } + // remove sequences we don't know about + foreach($fromSchema->getSequences() as $table) { + if (!$toSchema->hasSequence($table->getName())) { + $fromSchema->dropSequence($table->getName()); + } + } $comparator = new \Doctrine\DBAL\Schema\Comparator(); $schemaDiff = $comparator->compare($fromSchema, $toSchema); |