summaryrefslogtreecommitdiffstats
path: root/lib/private/DB
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-06-07 13:51:54 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-07-05 13:01:19 +0200
commit5d9d1b1cb5c4c301e7c60f58225e9a85168eafbe (patch)
treebaac8378b873cc0518c664100b71288f953355bd /lib/private/DB
parent817783e4c7e93fc7bf3bdb50a014966415e19605 (diff)
downloadnextcloud-server-5d9d1b1cb5c4c301e7c60f58225e9a85168eafbe.tar.gz
nextcloud-server-5d9d1b1cb5c4c301e7c60f58225e9a85168eafbe.zip
Allow to check the schema in pre and post as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/DB')
-rw-r--r--lib/private/DB/MigrationService.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php
index 9c37a4ffa71..912166988c0 100644
--- a/lib/private/DB/MigrationService.php
+++ b/lib/private/DB/MigrationService.php
@@ -390,9 +390,11 @@ class MigrationService {
throw new \InvalidArgumentException('Not a valid migration');
}
- $instance->preSchemaChange($this->output);
+ $instance->preSchemaChange($this->output, function() {
+ return $this->connection->createSchema();
+ }, ['tablePrefix' => $this->connection->getPrefix()]);
- $toSchema = $instance->changeSchema(function() {
+ $toSchema = $instance->changeSchema($this->output, function() {
return $this->connection->createSchema();
}, ['tablePrefix' => $this->connection->getPrefix()]);
@@ -400,7 +402,9 @@ class MigrationService {
$this->connection->migrateToSchema($toSchema);
}
- $instance->postSchemaChange($this->output);
+ $instance->postSchemaChange($this->output, function() {
+ return $this->connection->createSchema();
+ }, ['tablePrefix' => $this->connection->getPrefix()]);
$this->markAsExecuted($version);
}