|
@ -373,20 +373,20 @@ def check_org_clanek(): |
|
|
raise ValueError('There exists a Org-clanek!') |
|
|
raise ValueError('There exists a Org-clanek!') |
|
|
|
|
|
|
|
|
def check_res_clanek(): |
|
|
def check_res_clanek(): |
|
|
old_query = "SELECT * FROM seminar_problemy WHERE typ = 'res-clanek' ORDER BY id" |
|
|
return; # FIXME: Je vůbec co testovat? Ta tabulka obsahuje jen problem_ptr_id a cislo_id, které ale není nikde vyplněné. |
|
|
new_query = "SELECT * FROM seminar_clanky JOIN seminar_problemy as problem ON problem_ptr_id = problem.id ORDER BY problem_ptr_id" |
|
|
#old_query = "SELECT * FROM seminar_problemy WHERE typ = 'res-clanek' ORDER BY id" |
|
|
same_fields = [] |
|
|
#new_query = "SELECT * FROM seminar_clanky JOIN seminar_problemy as problem ON problem_ptr_id = problem.id ORDER BY problem_ptr_id" |
|
|
renamed_fields = [ |
|
|
#same_fields = [] |
|
|
] |
|
|
#renamed_fields = [] |
|
|
old_fields = same_fields + [f[0] for f in renamed_fields] |
|
|
#old_fields = same_fields + [f[0] for f in renamed_fields] |
|
|
new_fields = same_fields + [f[1] for f in renamed_fields] |
|
|
#new_fields = same_fields + [f[1] for f in renamed_fields] |
|
|
|
|
|
|
|
|
old_res, new_res = execute_simple(old_query, new_query) |
|
|
#old_res, new_res = execute_simple(old_query, new_query) |
|
|
res = zip(old_res,new_res) |
|
|
#res = zip(old_res,new_res) |
|
|
|
|
|
|
|
|
for o,n in res: |
|
|
#for o,n in res: |
|
|
check_same(o,n, old_fields, new_fields) |
|
|
# check_same(o,n, old_fields, new_fields) |
|
|
# TODO: Cislo |
|
|
## TODO: Cislo |
|
|
|
|
|
|
|
|
def check_untyped_problem(): |
|
|
def check_untyped_problem(): |
|
|
old_query = "SELECT * FROM seminar_problemy WHERE typ NOT IN ('uloha', 'tema', 'serial', 'konfera', 'org-clanek', 'res-clanek')" |
|
|
old_query = "SELECT * FROM seminar_problemy WHERE typ NOT IN ('uloha', 'tema', 'serial', 'konfera', 'org-clanek', 'res-clanek')" |
|
|