Code Duplication    Length = 8-8 lines in 2 locations

lib/private/Installer.php 1 location

@@ 573-580 (lines=8) @@
570
571
		//install the database
572
		$appPath = OC_App::getAppPath($app);
573
		if (isset($info['use-migrations']) && $info['use-migrations'] === 'true') {
574
			$ms = new \OC\DB\MigrationService($app, \OC::$server->getDatabaseConnection());
575
			$ms->migrate();
576
		} else {
577
			if(is_file($appPath.'/appinfo/database.xml')) {
578
				OC_DB::createDbFromStructure($appPath . '/appinfo/database.xml');
579
			}
580
		}
581
582
		//run appinfo/install.php
583
		\OC_App::registerAutoloading($app, $appPath);

lib/private/legacy/app.php 1 location

@@ 1226-1233 (lines=8) @@
1223
		}
1224
		$appData = self::getAppInfo($appId);
1225
		self::executeRepairSteps($appId, $appData['repair-steps']['pre-migration']);
1226
		if (isset($appData['use-migrations']) && $appData['use-migrations'] === 'true') {
1227
			$ms = new \OC\DB\MigrationService($appId, \OC::$server->getDatabaseConnection());
1228
			$ms->migrate();
1229
		} else {
1230
			if (file_exists($appPath . '/appinfo/database.xml')) {
1231
				OC_DB::updateDbFromStructure($appPath . '/appinfo/database.xml');
1232
			}
1233
		}
1234
		self::executeRepairSteps($appId, $appData['repair-steps']['post-migration']);
1235
		self::setupLiveMigrations($appId, $appData['repair-steps']['live-migration']);
1236
		unset(self::$appVersion[$appId]);