Browse Source

Fix query opravovatele

middleware_test
Pavel Turinsky (DebianVM @ Zr) 3 years ago
parent
commit
c5620e0fca
  1. 8
      db_compare.py

8
db_compare.py

@ -333,13 +333,15 @@ def check_problem_common():
# Opravovatelé # Opravovatelé
old_query = "SELECT id, opravovatel_id FROM seminar_problemy" old_query = "SELECT id, opravovatel_id FROM seminar_problemy"
new_query = "SELECT problem_id, opravovatel_id FROM seminar_problemy_opravovatele" new_query = "SELECT problem_id, organizator_id FROM seminar_problemy_opravovatele"
# Simple cursors # Simple cursors
#oldcur = oldconn.cursor() #oldcur = oldconn.cursor()
old_results = oldcur.execute(old_query).fetchall() oldcur.execute(old_query)
old_results = oldcur.fetchall()
#newcur = newconn.cursor() #newcur = newconn.cursor()
new_results = newcur.execute(new_query).fetchall() newcur.execute(new_query)
new_results = newcur.fetchall()
for oldr in old_results: for oldr in old_results:
if oldr not in new_results: if oldr not in new_results:

Loading…
Cancel
Save