From 82f0bcce30329df723001b0d08c62d4f0af3afc1 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sun, 17 Mar 2013 17:28:36 +0100 Subject: [PATCH] Also fix sequences in schemachange --- lib/db/schema.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/db/schema.php b/lib/db/schema.php index 7a1ec20404..8941881d4e 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);