summaryrefslogtreecommitdiffstats
path: root/lib/private/app.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-11-11 17:26:08 +0100
committerLukas Reschke <lukas@owncloud.com>2014-11-13 12:07:49 +0100
commit5f8fb8d1ee61e069adc7fcad6a3aad63f44bd1a6 (patch)
treedfec7d16bcaf055d15106e28fc0c99caef4a4a2a /lib/private/app.php
parent5ca869c3241d159b2bd2c45b79c49b085c277968 (diff)
downloadnextcloud-server-5f8fb8d1ee61e069adc7fcad6a3aad63f44bd1a6.tar.gz
nextcloud-server-5f8fb8d1ee61e069adc7fcad6a3aad63f44bd1a6.zip
Run preupdate before an update
The update routine tries to test the database migration before actually performing the update. However, this will fail hard if the schema has changed (for example an unique key has been added). App developers can convert the DB in preupdate.php, however it is not called before and therefore the update fails. This actually breaks ownCloud updates from ownCloud 6 to ownCloud 7 when the files_antivirus app is enabled.
Diffstat (limited to 'lib/private/app.php')
-rw-r--r--lib/private/app.php4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/private/app.php b/lib/private/app.php
index 73576088d15..bc9ca0351ea 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');
}