2012-06-07 19:07:51 +04:00
|
|
|
<?php
|
|
|
|
|
2012-06-08 01:38:50 +04:00
|
|
|
$currentVersion=OC_Appconfig::getValue('gallery', 'installed_version');
|
|
|
|
if (version_compare($currentVersion, '0.5.0', '<')) {
|
|
|
|
$stmt = OCP\DB::prepare('DROP TABLE IF EXISTS *PREFIX*gallery_photos');
|
|
|
|
$stmt->execute();
|
|
|
|
$stmt = OCP\DB::prepare('DROP TABLE IF EXISTS *PREFIX*gallery_albums');
|
|
|
|
$stmt->execute();
|
2012-06-07 19:07:51 +04:00
|
|
|
|
2012-06-08 01:38:50 +04:00
|
|
|
\OC_DB::createDbFromStructure(OC::$APPSROOT.'/apps/'.$appid.'/appinfo/database.xml');
|
|
|
|
}
|