From 5ada37c5ed18287b5cff75692cdbe6643ac0c1e2 Mon Sep 17 00:00:00 2001 From: "Pavel Turinsky (DebianVM @ Zr)" Date: Tue, 29 Jun 2021 17:51:59 +0000 Subject: [PATCH] Lepsi komentare SQL :-) --- db_compare.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db_compare.py b/db_compare.py index 49a7ab36..512634e8 100755 --- a/db_compare.py +++ b/db_compare.py @@ -398,15 +398,15 @@ def check_tema(): -- TvCNode má dva potomky, oba TextNode. První drží původní text zadání, druhý řešení. INNER JOIN seminar_nodes_temavcisle AS tvcn ON tvcn.tema_id = id INNER JOIN seminar_nodes_treenode AS ttn ON tvcn.treenode_ptr_id = ttn.id - LEFT OUTER JOIN seminar_nodes_treenode AS zad_tn ON ttn.first_child_id = zad_tn.id -- jen 33 z nich - LEFT OUTER JOIN seminar_nodes_treenode AS res_tn ON zad_tn.succ_id = res_tn.id -- jen 4 z nich + LEFT OUTER JOIN seminar_nodes_treenode AS zad_tn ON ttn.first_child_id = zad_tn.id -- jen 33 z nich ma zadani + LEFT OUTER JOIN seminar_nodes_treenode AS res_tn ON zad_tn.succ_id = res_tn.id -- jen 4 z nich ma reseni LEFT OUTER JOIN seminar_nodes_obsah AS zad_on ON zad_on.treenode_ptr_id = zad_tn.id LEFT OUTER JOIN seminar_nodes_obsah AS res_on ON res_on.treenode_ptr_id = res_tn.id LEFT OUTER JOIN seminar_texty AS zad_text ON zad_on.text_id = zad_text.id LEFT OUTER JOIN seminar_texty AS res_text ON res_on.text_id = res_text.id -- vsechny 4 -- Ročník tématu: - -- Podle rootu TvCN - LEFT OUTER JOIN seminar_nodes_rocnik AS rn ON ttn.root_id = rn.treenode_ptr_id -- nic + -- Podle rootu TvCN to nejde + LEFT OUTER JOIN seminar_nodes_rocnik AS rn ON ttn.root_id = rn.treenode_ptr_id ORDER BY problem_ptr_id""" same_fields = ['text_zadani', 'text_reseni', 'rocnik_id']