diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-10-25 15:38:08 +0200 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-11-01 10:57:39 +0100 |
commit | 979cabe0d4bbe51578bd7d998a06cdadb5d14ccf (patch) | |
tree | 54fd490e2c08653bf14bbc7dbe9a1db50ca6ae28 | |
parent | 0df79dd409b00d86f957057be56efddb6b07276b (diff) | |
download | nextcloud-server-979cabe0d4bbe51578bd7d998a06cdadb5d14ccf.tar.gz nextcloud-server-979cabe0d4bbe51578bd7d998a06cdadb5d14ccf.zip |
When updating an appstore app, execute a database update
See #5202
-rw-r--r-- | lib/installer.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/installer.php b/lib/installer.php index 467e486dd29..3299fb07390 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -196,7 +196,11 @@ class OC_Installer{ //install the database if(is_file($basedir.'/appinfo/database.xml')) { - OC_DB::createDbFromStructure($basedir.'/appinfo/database.xml'); + if (OC_Appconfig::getValue($info['id'], 'installed_version') === null) { + OC_DB::createDbFromStructure($basedir.'/appinfo/database.xml'); + } else { + OC_DB::updateDbFromStructure($basedir.'/appinfo/database.xml'); + } } //run appinfo/install.php |