Jonas Havelka
1 year ago
3 changed files with 187 additions and 5 deletions
@ -0,0 +1,104 @@ |
|||
# Generated by Django 2.2.28 on 2023-08-09 17:37 |
|||
|
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
import django.utils.timezone |
|||
import odevzdavatko.models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
initial = True |
|||
|
|||
dependencies = [ |
|||
('tvorba', '0001_initial'), |
|||
('personalni', '0002_organizator_osoba_prijemce_resitel_skola'), |
|||
('seminar', '0116_separace_odevzdavatka'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.SeparateDatabaseAndState( |
|||
state_operations=[ |
|||
migrations.CreateModel( |
|||
name='Hodnoceni', |
|||
fields=[ |
|||
('id', models.AutoField(primary_key=True, serialize=False)), |
|||
('body', models.DecimalField(blank=True, decimal_places=1, max_digits=8, null=True, verbose_name='body')), |
|||
('feedback', models.TextField(blank=True, default='', help_text='Zpětná vazba řešiteli (plain text)', verbose_name='zpětná vazba')), |
|||
('cislo_body', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='hodnoceni', to='tvorba.Cislo', verbose_name='číslo pro body')), |
|||
('deadline_body', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='hodnoceni', to='tvorba.Deadline', verbose_name='deadline pro body')), |
|||
('problem', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='hodnoceni', to='tvorba.Problem', verbose_name='problém')), |
|||
], |
|||
options={ |
|||
'verbose_name': 'Hodnocení', |
|||
'verbose_name_plural': 'Hodnocení', |
|||
'db_table': 'mam_hodnoceni', |
|||
}, |
|||
), |
|||
migrations.CreateModel( |
|||
name='Reseni', |
|||
fields=[ |
|||
('id', models.AutoField(primary_key=True, serialize=False)), |
|||
('cas_doruceni', models.DateTimeField(blank=True, default=django.utils.timezone.now, verbose_name='čas_doručení')), |
|||
('forma', models.CharField(choices=[('papir', 'Papírové řešení'), ('email', 'Emailem'), ('upload', 'Upload přes web')], default='email', max_length=16, verbose_name='forma řešení')), |
|||
('poznamka', models.TextField(blank=True, help_text='Neveřejná poznámka k řešení (plain text)', verbose_name='neveřejná poznámka')), |
|||
('zverejneno', models.BooleanField(default=False, help_text='Udává, zda je řešení zveřejněno', verbose_name='řešení zveřejněno')), |
|||
('problem', models.ManyToManyField(help_text='Problém', through='odevzdavatko.Hodnoceni', to='tvorba.Problem', verbose_name='problém')), |
|||
], |
|||
options={ |
|||
'verbose_name': 'Řešení', |
|||
'verbose_name_plural': 'Řešení', |
|||
'db_table': 'mam_reseni', |
|||
'ordering': ['-cas_doruceni'], |
|||
}, |
|||
), |
|||
migrations.CreateModel( |
|||
name='Reseni_Resitele', |
|||
fields=[ |
|||
('id', models.AutoField(primary_key=True, serialize=False)), |
|||
('reseni', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='odevzdavatko.Reseni', verbose_name='řešení')), |
|||
('resitele', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='personalni.Resitel', verbose_name='řešitel')), |
|||
], |
|||
options={ |
|||
'verbose_name': 'Řešení řešitelů', |
|||
'verbose_name_plural': 'Řešení řešitelů', |
|||
'db_table': 'mam_reseni_resitele', |
|||
'ordering': ['reseni', 'resitele'], |
|||
}, |
|||
), |
|||
migrations.AddField( |
|||
model_name='reseni', |
|||
name='resitele', |
|||
field=models.ManyToManyField(help_text='Seznam autorů řešení', through='odevzdavatko.Reseni_Resitele', to='personalni.Resitel', verbose_name='autoři řešení'), |
|||
), |
|||
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í'), |
|||
), |
|||
migrations.CreateModel( |
|||
name='PrilohaReseni', |
|||
fields=[ |
|||
('id', models.AutoField(primary_key=True, serialize=False)), |
|||
('vytvoreno', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False, verbose_name='vytvořeno')), |
|||
('soubor', models.FileField(upload_to=odevzdavatko.models.generate_filename, verbose_name='soubor')), |
|||
('poznamka', models.TextField(blank=True, help_text='Neveřejná poznámka k příloze řešení (plain text), např. o původu', verbose_name='neveřejná poznámka')), |
|||
('res_poznamka', models.TextField(blank=True, help_text='Poznámka k příloze řešení, např. co daný soubor obsahuje', verbose_name='poznámka řešitele')), |
|||
('reseni', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='prilohy', to='odevzdavatko.Reseni', verbose_name='řešení')), |
|||
], |
|||
options={ |
|||
'verbose_name': 'Příloha řešení', |
|||
'verbose_name_plural': 'Přílohy řešení', |
|||
'db_table': 'mam_priloha_reseni', |
|||
'ordering': ['reseni', 'vytvoreno'], |
|||
}, |
|||
), |
|||
migrations.AddField( |
|||
model_name='hodnoceni', |
|||
name='reseni', |
|||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='odevzdavatko.Reseni', verbose_name='řešení'), |
|||
), |
|||
], |
|||
database_operations=[], |
|||
), |
|||
] |
@ -0,0 +1,78 @@ |
|||
# Generated by Django 2.2.28 on 2023-08-09 17:37 |
|||
|
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('seminar', '0115_separace_tvorby'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.SeparateDatabaseAndState( |
|||
state_operations=[ |
|||
migrations.RemoveField( |
|||
model_name='prilohareseni', |
|||
name='reseni', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='reseni', |
|||
name='problem', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='reseni', |
|||
name='resitele', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='reseni', |
|||
name='text_cely', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='reseni_resitele', |
|||
name='reseni', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='reseni_resitele', |
|||
name='resitele', |
|||
), |
|||
migrations.AlterField( |
|||
model_name='reseninode', |
|||
name='reseni', |
|||
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='odevzdavatko.Reseni', verbose_name='reseni'), |
|||
), |
|||
], |
|||
database_operations=[], |
|||
), |
|||
migrations.SeparateDatabaseAndState( |
|||
state_operations=[ |
|||
migrations.DeleteModel( |
|||
name='Hodnoceni', |
|||
), |
|||
migrations.DeleteModel( |
|||
name='PrilohaReseni', |
|||
), |
|||
migrations.DeleteModel( |
|||
name='Reseni', |
|||
), |
|||
migrations.DeleteModel( |
|||
name='Reseni_Resitele', |
|||
), |
|||
], |
|||
database_operations=[ |
|||
migrations.AlterModelTable( |
|||
name='Hodnoceni', table="mam_hodnoceni", |
|||
), |
|||
migrations.AlterModelTable( |
|||
name='Reseni', table="mam_reseni", |
|||
), |
|||
migrations.AlterModelTable( |
|||
name='Reseni_Resitele', table="mam_reseni_resitele", |
|||
), |
|||
migrations.AlterModelTable( |
|||
name='PrilohaReseni', table="mam_priloha_reseni", |
|||
), |
|||
], |
|||
), |
|||
] |
Loading…
Reference in new issue