diff --git a/seminar/migrations/0001_squashed_0067_auto_20190814_0805.py b/seminar/migrations/0001_squashed_0067_auto_20190814_0805.py index 5eb3e452..f9a8b5eb 100644 --- a/seminar/migrations/0001_squashed_0067_auto_20190814_0805.py +++ b/seminar/migrations/0001_squashed_0067_auto_20190814_0805.py @@ -877,6 +877,7 @@ class Migration(migrations.Migration): ), migrations.RunSQL( sql='update seminar_rocniky set rocnik_n = cast (rocnik as integer)', + reverse_sql='update seminar_rocniky set rocnik_n = cast (rocnik as nvarchar(16))', ), migrations.RemoveField( model_name='rocnik', @@ -1733,15 +1734,19 @@ class Migration(migrations.Migration): # migr 0052 migrations.RunPython( spoj_k_organizatorum_osoby, + reverse_code=migrations.RunPython.noop, ), migrations.RunPython( fix_problem, + reverse_code=migrations.RunPython.noop, ), migrations.RunPython( fix_pohadka, + reverse_code=migrations.RunPython.noop, ), migrations.RunPython( fix_novinka, + reverse_code=migrations.RunPython.noop, ), # migr 0053 @@ -1795,25 +1800,31 @@ class Migration(migrations.Migration): # migr 0056 migrations.RunPython( generuj_RocnikNody_a_CisloNody, + reverse_code=migrations.RunPython.noop, ), # migr 0057 migrations.RunPython( reseni_to_Reseni, + reverse_code=migrations.RunPython.noop, ), # migr 0058 migrations.RunPython( uloha_to_Uloha, + reverse_code=migrations.RunPython.noop, ), migrations.RunPython( tema_to_Tema, + reverse_code=migrations.RunPython.noop, ), migrations.RunPython( clanek_to_Clanek, + reverse_code=migrations.RunPython.noop, ), migrations.RunPython( konfery_rucne, + reverse_code=migrations.RunPython.noop, ), # migr "fix 0058" @@ -1825,11 +1836,13 @@ class Migration(migrations.Migration): # migr 0059 migrations.RunPython( vytvor_pohadkanode, + reverse_code=migrations.RunPython.noop, ), # migr 0060 migrations.RunPython( pokacej_les, + reverse_code=migrations.RunPython.noop, ), migrations.RemoveField( diff --git a/seminar/migrations/0019_rocnik_ciselne.py b/seminar/migrations/0019_rocnik_ciselne.py index 42308b2f..da9591aa 100644 --- a/seminar/migrations/0019_rocnik_ciselne.py +++ b/seminar/migrations/0019_rocnik_ciselne.py @@ -18,7 +18,8 @@ class Migration(migrations.Migration): preserve_default=False, ), migrations.RunSQL( - sql="update seminar_rocniky set rocnik_n = cast (rocnik as integer)" + sql="update seminar_rocniky set rocnik_n = cast (rocnik as integer)", + reverse_sql='update seminar_rocniky set rocnik_n = cast (rocnik as nvarchar(16))', ), migrations.RemoveField( model_name='rocnik', diff --git a/seminar/migrations/0052_user_to_organizator.py b/seminar/migrations/0052_user_to_organizator.py index d52e29ca..db3827ce 100644 --- a/seminar/migrations/0052_user_to_organizator.py +++ b/seminar/migrations/0052_user_to_organizator.py @@ -75,8 +75,8 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(spoj_k_organizatorum_osoby), - migrations.RunPython(fix_problem), - migrations.RunPython(fix_pohadka), - migrations.RunPython(fix_novinka), + migrations.RunPython(spoj_k_organizatorum_osoby, migrations.RunPython.noop), + migrations.RunPython(fix_problem, migrations.RunPython.noop), + migrations.RunPython(fix_pohadka, migrations.RunPython.noop), + migrations.RunPython(fix_novinka, migrations.RunPython.noop), ] diff --git a/seminar/migrations/0056_vrcholy_pro_rocniky_a_cisla.py b/seminar/migrations/0056_vrcholy_pro_rocniky_a_cisla.py index 024400a4..56146261 100644 --- a/seminar/migrations/0056_vrcholy_pro_rocniky_a_cisla.py +++ b/seminar/migrations/0056_vrcholy_pro_rocniky_a_cisla.py @@ -43,5 +43,5 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(generuj_RocnikNody_a_CisloNody), + migrations.RunPython(generuj_RocnikNody_a_CisloNody, migrations.RunPython.noop), ] diff --git a/seminar/migrations/0057_reseni_to_reseni_hodnoceni.py b/seminar/migrations/0057_reseni_to_reseni_hodnoceni.py index b3f0405b..a11d99ae 100644 --- a/seminar/migrations/0057_reseni_to_reseni_hodnoceni.py +++ b/seminar/migrations/0057_reseni_to_reseni_hodnoceni.py @@ -30,5 +30,5 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(reseni_to_Reseni) + migrations.RunPython(reseni_to_Reseni, migrations.RunPython.noop) ] diff --git a/seminar/migrations/0058_problem_to_uloha_tema_clanek.py b/seminar/migrations/0058_problem_to_uloha_tema_clanek.py index 333f5453..7d651edb 100644 --- a/seminar/migrations/0058_problem_to_uloha_tema_clanek.py +++ b/seminar/migrations/0058_problem_to_uloha_tema_clanek.py @@ -154,8 +154,8 @@ class Migration(migrations.Migration): operations = [ # ashes to Ashes, dust to Dust.... - migrations.RunPython(uloha_to_Uloha), - migrations.RunPython(tema_to_Tema), - migrations.RunPython(clanek_to_Clanek), - migrations.RunPython(konfery_rucne), + migrations.RunPython(uloha_to_Uloha, migrations.RunPython.noop), + migrations.RunPython(tema_to_Tema, migrations.RunPython.noop), + migrations.RunPython(clanek_to_Clanek, migrations.RunPython.noop), + migrations.RunPython(konfery_rucne, migrations.RunPython.noop), ] diff --git a/seminar/migrations/0059_vytvorit_pohadkanode.py b/seminar/migrations/0059_vytvorit_pohadkanode.py index d0edd677..2a78c7ee 100644 --- a/seminar/migrations/0059_vytvorit_pohadkanode.py +++ b/seminar/migrations/0059_vytvorit_pohadkanode.py @@ -25,5 +25,5 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(vytvor_pohadkanode), + migrations.RunPython(vytvor_pohadkanode, migrations.RunPython.noop), ] diff --git a/seminar/migrations/0060_spoj_stromy.py b/seminar/migrations/0060_spoj_stromy.py index a94caf48..c02b8d12 100644 --- a/seminar/migrations/0060_spoj_stromy.py +++ b/seminar/migrations/0060_spoj_stromy.py @@ -108,5 +108,5 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(pokacej_les), + migrations.RunPython(pokacej_les, migrations.RunPython.noop), ] diff --git a/seminar/migrations/0068_treenode_nazev.py b/seminar/migrations/0068_treenode_nazev.py index bead85d3..c0024c8d 100644 --- a/seminar/migrations/0068_treenode_nazev.py +++ b/seminar/migrations/0068_treenode_nazev.py @@ -103,5 +103,5 @@ class Migration(migrations.Migration): name='nazev', field=models.TextField(help_text='Tento název se zobrazuje v nabídkách pro výběr vhodného TreeNode', null=True, verbose_name='název tohoto node'), ), - migrations.RunPython(fix_all_names), + migrations.RunPython(fix_all_names, migrations.RunPython.noop), ] diff --git a/seminar/migrations/0080_zruseni_claneknode_a_konferanode.py b/seminar/migrations/0080_zruseni_claneknode_a_konferanode.py index 13d083f9..34c22249 100644 --- a/seminar/migrations/0080_zruseni_claneknode_a_konferanode.py +++ b/seminar/migrations/0080_zruseni_claneknode_a_konferanode.py @@ -65,6 +65,9 @@ class Migration(migrations.Migration): model_name='reseni', name='text_zkraceny', ), + migrations.DeleteModel( # nejdříve musím smazat objekt ukazující na konferu, + name='KonferaNode', # pak až změnit klíč konferám (viz další operace) + ), migrations.AddField( model_name='konfera', name='problem_ptr', @@ -95,9 +98,6 @@ class Migration(migrations.Migration): migrations.DeleteModel( name='ClanekNode', ), - migrations.DeleteModel( - name='KonferaNode', - ), migrations.CreateModel( name='Konfery_Ucastnici', fields=[