diff options
-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); |