diff --git a/appinfo/update.php b/appinfo/update.php index 3872060e..0e6953d2 100644 --- a/appinfo/update.php +++ b/appinfo/update.php @@ -42,3 +42,11 @@ if (version_compare($installedVersion, '0.3.0.14', '==')) { $stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*contacts_ocu_cards_properties`'); $result = $stmt->execute(array()); } + +if(version_compare($installedVersion, '0.3.0.18', '<')){ + $stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*contacts_cards_properties` + WHERE NOT EXISTS(SELECT NULL + FROM `*PREFIX*contacts_cards` + WHERE `*PREFIX*contacts_cards`.id = `*PREFIX*contacts_cards_properties`.contactid)'); + $result = $stmt->execute(array()); +} diff --git a/appinfo/version b/appinfo/version index 2382399e..05c9e3cc 100644 --- a/appinfo/version +++ b/appinfo/version @@ -1 +1 @@ -0.3.0.17 +0.3.0.18