Permalink
Browse files

3 more consistency checks

  • Loading branch information...
gggeek committed Oct 27, 2018
1 parent 8391731 commit 2609adbb379a78289c008266c439188302d8e41c
Showing with 5 additions and 0 deletions.
  1. +5 −0 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)

0 comments on commit 2609adb

Please sign in to comment.