Merge pull request #26379 from nextcloud/backport/25924/stable21

[stable21] Only mark migrations as installed after execution
This commit is contained in:
Christoph Wurst 2021-03-31 07:43:32 +02:00 committed by GitHub
commit 0432b32535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -453,8 +453,6 @@ class MigrationService {
$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 @@ class MigrationService {
$this->connection->migrateToSchema($targetSchema);
$toSchema->performDropTableCalls();
}
foreach ($toBeExecuted as $version) {
$this->markAsExecuted($version);
}
}
/**