From 2609adbb379a78289c008266c439188302d8e41c Mon Sep 17 00:00:00 2001 From: gggeek Date: Sun, 28 Oct 2018 00:49:34 +0100 Subject: [PATCH] 3 more consistency checks --- settings/ezdbintegrity.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/settings/ezdbintegrity.ini b/settings/ezdbintegrity.ini index 874a87e..058ee66 100644 --- a/settings/ezdbintegrity.ini +++ b/settings/ezdbintegrity.ini @@ -260,3 +260,8 @@ ezflow_blocks_with_invalid_zones[sql]=SELECT * FROM ezm_block WHERE zone_id NOT nodes_with_wrong_path[sql]=SELECT * FROM ezcontentobject_tree c, ezcontentobject_tree p WHERE c.parent_node_id = p.node_id AND c.path_string NOT REGEXP CONCAT('^',p.path_string,c.node_id,'/$') AND c.node_id <> 1; attributes_without_version[sql]=SELECT * FROM ezcontentobject_attribute a WHERE version NOT IN (SELECT version FROM ezcontentobject_version v WHERE a.contentobject_id = v.contentobject_id) object_names_without_version[sql]=SELECT * FROM ezcontentobject_name n WHERE content_version NOT IN (SELECT version FROM ezcontentobject_version v WHERE n.contentobject_id = v.contentobject_id) +published_objects_without_nodes[sql]=SELECT * FROM ezcontentobject WHERE status = 1 AND id NOT IN (SELECT contentobject_id FROM ezcontentobject_tree) +trashed_objects_without_trash[sql]=SELECT * FROM ezcontentobject WHERE status = 2 AND id NOT IN (SELECT contentobject_id FROM ezcontentobject_trash) +published_objects_without_published_current_version[sql]=SELECT * FROM ezcontentobject o WHERE status = 1 AND current_version NOT IN (SELECT version FROM ezcontentobject_version WHERE contentobject_id = o.id AND status=1) +# for the one below, do we need to account as well for version states 2 and 4 ? +#draft_objects_with_no_draft_versions[sql]=SELECT * FROM ezcontentobject WHERE status = 0 AND id NOT IN (SELECT contentobject_id FROM ezcontentobject_version WHERE status IN (0, 5)