Merge pull request #25924 from nextcloud/bugfix/noid/only-mark-migrations-as-installed-after-executing-them-in-case-the-developer-broke-them
Only mark migrations as installed after execution
This commit is contained in:
commit
459e0b311b
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue