diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-03-17 20:29:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-17 20:29:28 +0100 |
commit | 459e0b311bc1af926789f31e28932df7e0eec6bb (patch) | |
tree | 6b6a7dcaa6c9e64cad1771574bcfec105df07c90 /lib/private/DB | |
parent | f56e5bb0dbf42690c5dcc9ba43f4cad853ff5a83 (diff) | |
parent | 1e5fea0460a3e7de78b141acaec49a4cb750c4d7 (diff) | |
download | nextcloud-server-459e0b311bc1af926789f31e28932df7e0eec6bb.tar.gz nextcloud-server-459e0b311bc1af926789f31e28932df7e0eec6bb.zip |
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
Diffstat (limited to 'lib/private/DB')
-rw-r--r-- | lib/private/DB/MigrationService.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index 8bbd077d85d..42f3b7de6a8 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -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); + } } /** |