diff options
author | Joas Schilling <coding@schilljs.com> | 2017-06-07 15:15:53 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-07-05 13:02:16 +0200 |
commit | fe6e8c2710a4df0aedc9dd4d2323ed009a53a763 (patch) | |
tree | 1f55b5e9b0cbeb39d81e07c237869bc4cb6bf742 /lib/private/DB/MigrationService.php | |
parent | 543c181ec5c0b41a6e54bc59bfc1501fa53e8052 (diff) | |
download | nextcloud-server-fe6e8c2710a4df0aedc9dd4d2323ed009a53a763.tar.gz nextcloud-server-fe6e8c2710a4df0aedc9dd4d2323ed009a53a763.zip |
Fix dropping tables and handle the prefix automatically
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/DB/MigrationService.php')
-rw-r--r-- | lib/private/DB/MigrationService.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index 912166988c0..e4a001c6d97 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -395,11 +395,12 @@ class MigrationService { }, ['tablePrefix' => $this->connection->getPrefix()]); $toSchema = $instance->changeSchema($this->output, function() { - return $this->connection->createSchema(); + return new SchemaWrapper($this->connection); }, ['tablePrefix' => $this->connection->getPrefix()]); - if ($toSchema instanceof Schema) { - $this->connection->migrateToSchema($toSchema); + if ($toSchema instanceof SchemaWrapper) { + $this->connection->migrateToSchema($toSchema->getWrappedSchema()); + $toSchema->performDropTableCalls(); } $instance->postSchemaChange($this->output, function() { |