From 3b646a1099b4ec937854f9ad550cf55ec671426c Mon Sep 17 00:00:00 2001 From: "Pavel Turinsky (DebianVM @ Zr)" Date: Tue, 22 Jun 2021 23:02:54 +0000 Subject: [PATCH] Migrace: Reseni.text_cely budiz od vzdycky jen FK na ReseniNode --- seminar/migrations/0049_auto_20190430_2354.py | 5 ----- seminar/migrations/0050_auto_20190510_2228.py | 5 ----- seminar/migrations/0051_resitel_to_osoba.py | 2 +- seminar/migrations/0064_auto_20190610_2358.py | 2 +- seminar/migrations/0066c_reseninode.py | 7 ++++++- seminar/migrations/0077_auto_20200318_2146.py | 2 +- 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/seminar/migrations/0049_auto_20190430_2354.py b/seminar/migrations/0049_auto_20190430_2354.py index 8abe0460..14fa23d8 100644 --- a/seminar/migrations/0049_auto_20190430_2354.py +++ b/seminar/migrations/0049_auto_20190430_2354.py @@ -480,11 +480,6 @@ class Migration(migrations.Migration): name='resitele', field=models.ManyToManyField(help_text='Seznam autorů řešení', through='seminar.Reseni_Resitele', to='seminar.Resitel', verbose_name='autoři řešení'), ), - migrations.AddField( - model_name='reseni', - name='text_cely', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reseni_cely_set', to='seminar.Text', verbose_name='Plná verze textu řešení'), - ), migrations.AddField( model_name='reseni', name='text_zkraceny', diff --git a/seminar/migrations/0050_auto_20190510_2228.py b/seminar/migrations/0050_auto_20190510_2228.py index c6ed9f66..a9afc764 100644 --- a/seminar/migrations/0050_auto_20190510_2228.py +++ b/seminar/migrations/0050_auto_20190510_2228.py @@ -23,11 +23,6 @@ class Migration(migrations.Migration): name='osoba', field=models.OneToOneField(help_text='osobní údaje organizátora', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='org', to='seminar.Osoba', verbose_name='osoba'), ), - migrations.AlterField( - model_name='reseni', - name='text_cely', - field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reseni_cely_set', to='seminar.Text', verbose_name='Plná verze textu řešení'), - ), migrations.AlterField( model_name='resitel', name='osoba', diff --git a/seminar/migrations/0051_resitel_to_osoba.py b/seminar/migrations/0051_resitel_to_osoba.py index 17237bd0..2103a509 100644 --- a/seminar/migrations/0051_resitel_to_osoba.py +++ b/seminar/migrations/0051_resitel_to_osoba.py @@ -81,7 +81,7 @@ def osoba_to_resitel(apps, schema_editor): class Migration(migrations.Migration): dependencies = [ - ('seminar', '0050_auto_20190510_2228'), + ('seminar', '0066c_reseninode'), ] operations = [ diff --git a/seminar/migrations/0064_auto_20190610_2358.py b/seminar/migrations/0064_auto_20190610_2358.py index b72a08a0..78e62862 100644 --- a/seminar/migrations/0064_auto_20190610_2358.py +++ b/seminar/migrations/0064_auto_20190610_2358.py @@ -92,7 +92,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='reseni', name='text_cely', - field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='reseni_cely_set', to='seminar.Text', verbose_name='Plná verze textu řešení'), + field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='reseni_cely_set', to='seminar.ReseniNode', verbose_name='Plná verze textu řešení'), ), migrations.AlterField( model_name='reseni_resitele', diff --git a/seminar/migrations/0066c_reseninode.py b/seminar/migrations/0066c_reseninode.py index ae3e5a4e..8e3bd3cd 100644 --- a/seminar/migrations/0066c_reseninode.py +++ b/seminar/migrations/0066c_reseninode.py @@ -8,7 +8,7 @@ class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), - ('seminar', '0066b_orgtextnode'), + ('seminar', '0050_auto_20190510_2228'), ] operations = [ @@ -25,5 +25,10 @@ class Migration(migrations.Migration): }, bases=('seminar.treenode',), ), + migrations.AddField( + model_name='reseni', + name='text_cely', + field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='reseni_cely_set', to='seminar.ReseniNode', verbose_name='Plná verze textu řešení'), + ), ] diff --git a/seminar/migrations/0077_auto_20200318_2146.py b/seminar/migrations/0077_auto_20200318_2146.py index cc0e8c15..5f5f2e26 100644 --- a/seminar/migrations/0077_auto_20200318_2146.py +++ b/seminar/migrations/0077_auto_20200318_2146.py @@ -7,7 +7,7 @@ import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ - ('seminar', '0066c_reseninode'), + ('seminar', '0066b_orgtextnode'), ] operations = [