Merge pull request #26379 from nextcloud/backport/25924/stable21
[stable21] Only mark migrations as installed after execution
This commit is contained in:
commit
0432b32535
|
@ -453,8 +453,6 @@ class MigrationService {
|
||||||
$toSchema = $instance->changeSchema($this->output, function () use ($toSchema) {
|
$toSchema = $instance->changeSchema($this->output, function () use ($toSchema) {
|
||||||
return $toSchema ?: new SchemaWrapper($this->connection);
|
return $toSchema ?: new SchemaWrapper($this->connection);
|
||||||
}, ['tablePrefix' => $this->connection->getPrefix()]) ?: $toSchema;
|
}, ['tablePrefix' => $this->connection->getPrefix()]) ?: $toSchema;
|
||||||
|
|
||||||
$this->markAsExecuted($version);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($toSchema instanceof SchemaWrapper) {
|
if ($toSchema instanceof SchemaWrapper) {
|
||||||
|
@ -466,6 +464,10 @@ class MigrationService {
|
||||||
$this->connection->migrateToSchema($targetSchema);
|
$this->connection->migrateToSchema($targetSchema);
|
||||||
$toSchema->performDropTableCalls();
|
$toSchema->performDropTableCalls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($toBeExecuted as $version) {
|
||||||
|
$this->markAsExecuted($version);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue