Fix migrace
This commit is contained in:
parent
f01aed8af2
commit
d2f7f4b5ff
1 changed files with 32 additions and 14 deletions
|
@ -24,6 +24,13 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.DeleteModel(
|
||||
name='Konfery_Ucastnici',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='konfera',
|
||||
name='ucastnici',
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='OrgTextNode',
|
||||
fields=[
|
||||
|
@ -38,18 +45,14 @@ class Migration(migrations.Migration):
|
|||
},
|
||||
bases=('seminar.treenode',),
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='konfera',
|
||||
name='id',
|
||||
),
|
||||
migrations.RenameModel(
|
||||
old_name='OtisteneReseniNode',
|
||||
new_name='ReseniNode',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='konferanode',
|
||||
name='konfera',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='konferanode',
|
||||
name='treenode_ptr',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='clanek',
|
||||
name='cislo',
|
||||
|
@ -65,14 +68,9 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='konfera',
|
||||
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,
|
||||
),
|
||||
migrations.RunPython(vyrob_dummy_problemy),
|
||||
migrations.RemoveField(
|
||||
model_name='konfera',
|
||||
name='id',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='konfera',
|
||||
name='nazev',
|
||||
|
@ -100,4 +98,24 @@ class Migration(migrations.Migration):
|
|||
migrations.DeleteModel(
|
||||
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…
Reference in a new issue