diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index 447079110924f..42c3de3ea1eea 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -453,8 +453,6 @@ public function migrateSchemaOnly($to = 'latest') { $toSchema = $instance->changeSchema($this->output, function () use ($toSchema) { return $toSchema ?: new SchemaWrapper($this->connection); }, ['tablePrefix' => $this->connection->getPrefix()]) ?: $toSchema; - - $this->markAsExecuted($version); } if ($toSchema instanceof SchemaWrapper) { @@ -466,6 +464,10 @@ public function migrateSchemaOnly($to = 'latest') { $this->connection->migrateToSchema($targetSchema); $toSchema->performDropTableCalls(); } + + foreach ($toBeExecuted as $version) { + $this->markAsExecuted($version); + } } /**