]> source.dussan.org Git - nextcloud-server.git/commitdiff
Also fix sequences in schemachange
authorBart Visscher <bartv@thisnet.nl>
Sun, 17 Mar 2013 16:28:36 +0000 (17:28 +0100)
committerBart Visscher <bartv@thisnet.nl>
Sun, 17 Mar 2013 16:28:36 +0000 (17:28 +0100)
lib/db/schema.php

index 7a1ec204044dd2af5157f4318bdd7dd1933da846..8941881d4eac08ca28f65c12e70441d10506dac5 100644 (file)
@@ -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);