Browse Source

Fix migrace

middleware_test
Pavel 'LEdoian' Turinsky 5 years ago
parent
commit
d2f7f4b5ff
  1. 46
      seminar/migrations/0080_zruseni_claneknode_a_konferanode.py

46
seminar/migrations/0080_zruseni_claneknode_a_konferanode.py

@ -24,6 +24,13 @@ class Migration(migrations.Migration):
] ]
operations = [ operations = [
migrations.DeleteModel(
name='Konfery_Ucastnici',
),
migrations.RemoveField(
model_name='konfera',
name='ucastnici',
),
migrations.CreateModel( migrations.CreateModel(
name='OrgTextNode', name='OrgTextNode',
fields=[ fields=[
@ -38,18 +45,14 @@ class Migration(migrations.Migration):
}, },
bases=('seminar.treenode',), bases=('seminar.treenode',),
), ),
migrations.RemoveField(
model_name='konfera',
name='id',
),
migrations.RenameModel( migrations.RenameModel(
old_name='OtisteneReseniNode', old_name='OtisteneReseniNode',
new_name='ReseniNode', new_name='ReseniNode',
), ),
migrations.RemoveField(
model_name='konferanode',
name='konfera',
),
migrations.RemoveField(
model_name='konferanode',
name='treenode_ptr',
),
migrations.RemoveField( migrations.RemoveField(
model_name='clanek', model_name='clanek',
name='cislo', name='cislo',
@ -65,14 +68,9 @@ class Migration(migrations.Migration):
migrations.AddField( migrations.AddField(
model_name='konfera', model_name='konfera',
name='problem_ptr', name='problem_ptr',
field=models.OneToOneField(auto_created=True, null=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='seminar.Problem'), field=models.OneToOneField(auto_created=True, null=False, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='seminar.Problem'),
preserve_default=False, preserve_default=False,
), ),
migrations.RunPython(vyrob_dummy_problemy),
migrations.RemoveField(
model_name='konfera',
name='id',
),
migrations.RemoveField( migrations.RemoveField(
model_name='konfera', model_name='konfera',
name='nazev', name='nazev',
@ -100,4 +98,24 @@ class Migration(migrations.Migration):
migrations.DeleteModel( migrations.DeleteModel(
name='KonferaNode', name='KonferaNode',
), ),
migrations.CreateModel(
name='Konfery_Ucastnici',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('poznamka', models.TextField(blank=True, help_text='Neveřejná poznámka k účasti (plain text)', verbose_name='neveřejná poznámka')),
('konfera', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='seminar.Konfera', verbose_name='konfera')),
('resitel', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='seminar.Resitel', verbose_name='řešitel')),
],
options={
'verbose_name': 'Účast na konfeře',
'verbose_name_plural': 'Účasti na konfeře',
'db_table': 'seminar_konfery_ucastnici',
'ordering': ['konfera', 'resitel'],
},
),
migrations.AddField(
model_name='konfera',
name='ucastnici',
field=models.ManyToManyField(help_text='Seznam účastníků konfery', through='seminar.Konfery_Ucastnici', to='seminar.Resitel', verbose_name='účastníci konfery'),
),
] ]

Loading…
Cancel
Save