1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-10 21:24:33 +01:00

Remove old properties from deleted contacts, which were already deleted but readded

This commit is contained in:
LEDfan 2014-09-13 11:37:46 +02:00
parent 3d4224a090
commit 2bf76c213c
2 changed files with 9 additions and 1 deletions

View File

@ -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());
}

View File

@ -1 +1 @@
0.3.0.17
0.3.0.18