diff --git a/lib/private/app.php b/lib/private/app.php
index 73576088d1572019004e17d322504d70549258b5..bc9ca0351eaed85d35c3c80134519d1b89a66179 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -1180,10 +1180,6 @@ class OC_App {
 	 * @return bool
 	 */
 	public static function updateApp($appId) {
-		if (file_exists(self::getAppPath($appId) . '/appinfo/preupdate.php')) {
-			self::loadApp($appId, false);
-			include self::getAppPath($appId) . '/appinfo/preupdate.php';
-		}
 		if (file_exists(self::getAppPath($appId) . '/appinfo/database.xml')) {
 			OC_DB::updateDbFromStructure(self::getAppPath($appId) . '/appinfo/database.xml');
 		}
diff --git a/lib/private/updater.php b/lib/private/updater.php
index c4c70a3cc4a6b75d86dfbc26b93ff71025ca3b25..e07ff03ffc400dca814ff08d12e771c0f1cf97e1 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -245,7 +245,6 @@ class Updater extends BasicEmitter {
 	protected function checkAppUpgrade($version) {
 		$apps = \OC_App::getEnabledApps();
 
-
 		foreach ($apps as $appId) {
 			if ($version) {
 				$info = \OC_App::getAppInfo($appId);
@@ -255,6 +254,15 @@ class Updater extends BasicEmitter {
 			}
 
 			if ($compatible && \OC_App::shouldUpgrade($appId)) {
+				/**
+				 * FIXME: The preupdate check is performed before the database migration, otherwise database changes
+				 * are not possible anymore within it. - Consider this when touching the code.
+				 * @link https://github.com/owncloud/core/issues/10980
+				 * @see \OC_App::updateApp
+				 */
+				if (file_exists(\OC_App::getAppPath($appId) . '/appinfo/preupdate.php')) {
+					$this->includePreUpdate($appId);
+				}
 				if (file_exists(\OC_App::getAppPath($appId) . '/appinfo/database.xml')) {
 					\OC_DB::simulateUpdateDbFromStructure(\OC_App::getAppPath($appId) . '/appinfo/database.xml');
 				}
@@ -264,6 +272,14 @@ class Updater extends BasicEmitter {
 		$this->emit('\OC\Updater', 'appUpgradeCheck');
 	}
 
+	/**
+	 * Includes the pre-update file. Done here to prevent namespace mixups.
+	 * @param string $appId
+	 */
+	private function includePreUpdate($appId) {
+		include \OC_App::getAppPath($appId) . '/appinfo/preupdate.php';
+	}
+
 	protected function doAppUpgrade() {
 		$apps = \OC_App::getEnabledApps();