Fixed Upgrade35 wiping tag and post relations

This commit is contained in:
Marcin Kurczewski 2015-02-23 20:49:13 +01:00
parent fdb029eb5c
commit 0cf29a657a

View file

@ -90,10 +90,10 @@ class Upgrade35 implements IUpgrade
$pdo->exec(' $pdo->exec('
DELETE FROM postRelations DELETE FROM postRelations
WHERE (SELECT COUNT(1) FROM posts WHERE (posts.id = post1id) OR (posts.id = post2id) = 0)'); WHERE (SELECT COUNT(1) FROM posts WHERE (posts.id = post1id) OR (posts.id = post2id)) = 0');
$pdo->exec(' $pdo->exec('
DELETE FROM tagRelations DELETE FROM tagRelations
WHERE (SELECT COUNT(1) FROM tags WHERE (tags.id = tag1id) OR (tags.id = tag2id) = 0)'); WHERE (SELECT COUNT(1) FROM tags WHERE (tags.id = tag1id) OR (tags.id = tag2id)) = 0');
} }
} }