summaryrefslogtreecommitdiffstats
path: root/lib/private/Updater.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-06-01 16:56:34 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-07-05 13:01:19 +0200
commit15eec7b83c6198a124c2720e8ecc988605428f54 (patch)
tree62f47bb629b621b883efb17c02194972ba20a71f /lib/private/Updater.php
parentefa52ec1113eeccbd3935a8c96ea23c47ca190ab (diff)
downloadnextcloud-server-15eec7b83c6198a124c2720e8ecc988605428f54.tar.gz
nextcloud-server-15eec7b83c6198a124c2720e8ecc988605428f54.zip
Start migrations
Fixme: - Install and update of apps - No revert on live systems (debug only) - Service adjustment to our interface - Loading via autoloader Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Updater.php')
-rw-r--r--lib/private/Updater.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 6d08e5d4cc0..464344d2209 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -32,6 +32,7 @@
namespace OC;
+use OC\DB\MigrationService;
use OC\Hooks\BasicEmitter;
use OC\IntegrityCheck\Checker;
use OC_App;
@@ -300,8 +301,11 @@ class Updater extends BasicEmitter {
protected function doCoreUpgrade() {
$this->emit('\OC\Updater', 'dbUpgradeBefore');
- // do the real upgrade
- \OC_DB::updateDbFromStructure(\OC::$SERVERROOT . '/db_structure.xml');
+ // execute core migrations
+ if (is_dir(\OC::$SERVERROOT . '/core/Migrations')) {
+ $ms = new MigrationService('core', \OC::$server->getDatabaseConnection());
+ $ms->migrate();
+ }
$this->emit('\OC\Updater', 'dbUpgrade');
}