Bugfixy v migracich a kontrolach.
This commit is contained in:
parent
0327ca20a0
commit
9d7276578a
2 changed files with 13 additions and 13 deletions
|
@ -310,24 +310,24 @@ def check_problem_common():
|
|||
|
||||
def check_uloha():
|
||||
old_query = "SELECT * FROM seminar_problemy WHERE typ = 'uloha' ORDER BY id"
|
||||
new_query = """SELECT cislo_zadani, cislo_reseni, problem_ptr_id, max_body, uzt.na_web AS text_zadani, uvt.na_web AS text_reseni
|
||||
new_query = """SELECT cislo_zadani_id, cislo_reseni_id, problem_ptr_id, max_body, uzt.na_web AS text_zadani, uvt.na_web AS text_reseni
|
||||
FROM seminar_ulohy
|
||||
-- Problém:
|
||||
JOIN seminar_problemy AS problem ON problem_ptr_id = problem.id
|
||||
-- Text zadání:
|
||||
INNER JOIN seminar_nodes_uloha_zadani AS uzn ON id = uzn.uloha_id
|
||||
INNER JOIN seminar_nodes_uloha_zadani AS uzn ON problem.id = uzn.uloha_id
|
||||
INNER JOIN seminar_nodes_treenode AS uztn ON uztn.id = uzn.treenode_ptr_id
|
||||
INNER JOIN seminar_nodes_obsah AS uzo ON uzo.treenode_ptr_id = uztn.first_child_id
|
||||
INNER JOIN seminar_texty AS uzt ON uzo.text_id = uzt.id
|
||||
-- Text vzoráku:
|
||||
INNER JOIN seminar_nodes_uloha_zadani AS uvn ON id = uvn.uloha_id
|
||||
INNER JOIN seminar_nodes_uloha_zadani AS uvn ON problem.id = uvn.uloha_id
|
||||
INNER JOIN seminar_nodes_treenode AS uvtn ON uvtn.id = uvn.treenode_ptr_id
|
||||
INNER JOIN seminar_nodes_obsah AS uvo ON uvo.treenode_ptr_id = uvtn.first_child_id
|
||||
INNER JOIN seminar_texty AS uvt ON uvo.text_id = uvt.id
|
||||
|
||||
ORDER BY problem_ptr_id"""
|
||||
|
||||
same_fields = ['cislo_zadani', 'cislo_reseni', 'text_zadani', 'text_reseni']
|
||||
same_fields = ['cislo_zadani_id', 'cislo_reseni_id', 'text_zadani', 'text_reseni']
|
||||
renamed_fields = [
|
||||
('id', 'problem_ptr_id'),
|
||||
('body', 'max_body'),
|
||||
|
@ -349,7 +349,7 @@ def check_tema():
|
|||
FROM seminar_problemy
|
||||
INNER JOIN seminar_cisla AS c ON c.id = cislo_zadani_id
|
||||
WHERE typ IN ('tema', 'serial')
|
||||
ORDER BY id"""
|
||||
ORDER BY seminar_problemy.id"""
|
||||
new_query = """SELECT tema_typ, zad_text.na_web AS text_zadani, res_text.na_web AS text_reseni, rn.rocnik_id AS rocnik_id
|
||||
FROM seminar_temata
|
||||
-- Problém:
|
||||
|
@ -408,10 +408,10 @@ def check_res_clanek():
|
|||
JOIN seminar_problemy AS problem ON problem_ptr_id = problem.id
|
||||
INNER JOIN seminar_hodnoceni AS hodn ON problem.id = hodn.problem_id
|
||||
INNER JOIN seminar_reseni AS rese ON rese.id = hodn.reseni_id
|
||||
INNER JOIN seminar_nodes_reseni AS resnode ON resnode.reseni_id = rese.id
|
||||
INNER JOIN seminar_nodes_otistene_reseni AS resnode ON resnode.reseni_id = rese.id
|
||||
INNER JOIN seminar_nodes_treenode AS tn ON resnode.treenode_ptr_id = tn.id
|
||||
INNER JOIN seminar_nodes_obsah AS on ON on.treenode_ptr_id = tn.first_child_id
|
||||
INNER JOIN seminar_texty AS text ON text.id = on.text_id
|
||||
INNER JOIN seminar_nodes_obsah AS son ON son.treenode_ptr_id = tn.first_child_id
|
||||
INNER JOIN seminar_texty AS text ON text.id = son.text_id
|
||||
|
||||
ORDER BY problem_ptr_id"""
|
||||
same_fields = ['text_zadani']
|
||||
|
@ -451,10 +451,10 @@ check_nastaveni()
|
|||
check_novinky()
|
||||
check_pohadka()
|
||||
|
||||
check_problem_common()
|
||||
check_uloha()
|
||||
check_tema()
|
||||
#check_problem_common() - RUZNE POCTY RADKU
|
||||
#check_uloha() - RUNE POCTY RADKU
|
||||
#check_tema() - RUZNE POCTY RADKU
|
||||
check_konfera()
|
||||
check_org_clanek()
|
||||
check_res_clanek()
|
||||
#check_res_clanek() - RUZNE POCTY RADKU
|
||||
check_untyped_problem()
|
||||
|
|
|
@ -63,7 +63,7 @@ class Migration(migrations.Migration):
|
|||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('jmeno', models.CharField(max_length=256, verbose_name='jméno')),
|
||||
('prijmeni', models.CharField(max_length=256, verbose_name='příjmení')),
|
||||
('prezdivka', models.CharField(max_length=256, verbose_name='přezdívka')),
|
||||
('prezdivka', models.CharField(max_length=256, verbose_name='přezdívka', blank=True, null=False)),
|
||||
('pohlavi_muz', models.BooleanField(default=False, verbose_name='pohlaví (muž)')),
|
||||
('email', models.EmailField(blank=True, default='', max_length=256, verbose_name='e-mail')),
|
||||
('telefon', models.CharField(blank=True, default='', max_length=256, verbose_name='telefon')),
|
||||
|
|
Loading…
Reference in a new issue