| @@ 500-507 (lines=8) @@ | ||
| 497 | ||
| 498 | //install the database |
|
| 499 | $appPath = OC_App::getAppPath($app); |
|
| 500 | if (isset($info['use-migrations']) && $info['use-migrations'] === 'true') { |
|
| 501 | $ms = new \OC\DB\MigrationService($app, \OC::$server->getDatabaseConnection()); |
|
| 502 | $ms->migrate(); |
|
| 503 | } else { |
|
| 504 | if(is_file($appPath.'/appinfo/database.xml')) { |
|
| 505 | OC_DB::createDbFromStructure($appPath . '/appinfo/database.xml'); |
|
| 506 | } |
|
| 507 | } |
|
| 508 | ||
| 509 | //run appinfo/install.php |
|
| 510 | \OC_App::registerAutoloading($app, $appPath); |
|
| @@ 1072-1079 (lines=8) @@ | ||
| 1069 | } |
|
| 1070 | $appData = self::getAppInfo($appId); |
|
| 1071 | self::executeRepairSteps($appId, $appData['repair-steps']['pre-migration']); |
|
| 1072 | if (isset($appData['use-migrations']) && $appData['use-migrations'] === 'true') { |
|
| 1073 | $ms = new \OC\DB\MigrationService($appId, \OC::$server->getDatabaseConnection()); |
|
| 1074 | $ms->migrate(); |
|
| 1075 | } else { |
|
| 1076 | if (file_exists($appPath . '/appinfo/database.xml')) { |
|
| 1077 | OC_DB::updateDbFromStructure($appPath . '/appinfo/database.xml'); |
|
| 1078 | } |
|
| 1079 | } |
|
| 1080 | self::executeRepairSteps($appId, $appData['repair-steps']['post-migration']); |
|
| 1081 | self::setupLiveMigrations($appId, $appData['repair-steps']['live-migration']); |
|
| 1082 | self::clearAppCache($appId); |
|