When updating an appstore app, execute a database update

See #5202
This commit is contained in:
Bart Visscher 2013-10-25 15:38:08 +02:00
parent a555e00e2c
commit 310c8400df
1 changed files with 5 additions and 1 deletions

View File

@ -181,7 +181,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