From b8cded675ac44098a93d055d59ded9077e562147 Mon Sep 17 00:00:00 2001 From: "Pavel Turinsky (DebianVM @ Zr)" Date: Tue, 29 Jun 2021 22:45:35 +0000 Subject: [PATCH] Org postaru je user --- db_compare.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db_compare.py b/db_compare.py index 728a38d5..a3ba908c 100755 --- a/db_compare.py +++ b/db_compare.py @@ -332,7 +332,9 @@ def check_problem_common(): check_same(o,n, old_fields, new_fields) # Opravovatelé - old_query = "SELECT id, opravovatel_id FROM seminar_problemy" + # Po staru byli opravovatele organizatori, takze je potreba je dohledat. + old_query = """SELECT seminar_problemy.id, org.id AS opravovatel_id FROM seminar_problemy + JOIN seminar_organizator AS org ON seminar_problemy.opravovatel_id = org.user_id;""" new_query = "SELECT problem_id, organizator_id FROM seminar_problemy_opravovatele" # Simple cursors