diff --git a/aleksis/apps/chronos/migrations/0007_advanced_models_from_untis.py b/aleksis/apps/chronos/migrations/0007_advanced_models_from_untis.py new file mode 100644 index 0000000000000000000000000000000000000000..61807379b9bce2c160d6e75f21760ba37d088a8a --- /dev/null +++ b/aleksis/apps/chronos/migrations/0007_advanced_models_from_untis.py @@ -0,0 +1,101 @@ +# Generated by Django 3.0.2 on 2020-03-07 13:53 + +import django.contrib.postgres.fields.jsonb +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0016_advanced_models_from_untis'), + ('chronos', '0006_extended_data'), + ] + + operations = [ + migrations.CreateModel( + name='Absence', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('extended_data', django.contrib.postgres.fields.jsonb.JSONField(default=dict, editable=False)), + ('datefrom', models.DateField(null=True, verbose_name='Effective start date of absence')), + ('dateto', models.DateField(null=True, verbose_name='Effective end date of absence')), + ('periodfrom', models.IntegerField(null=True, verbose_name='Effective start period of absence')), + ('periodto', models.IntegerField(null=True, verbose_name='Effective end period of absence')), + ('comment', models.TextField(verbose_name='Comment')), + ], + options={ + 'verbose_name': 'Absence', + 'ordering': ['datefrom'], + }, + ), + migrations.CreateModel( + name='AbsenceReason', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('extended_data', django.contrib.postgres.fields.jsonb.JSONField(default=dict, editable=False)), + ('title', models.CharField(max_length=50, verbose_name='Title')), + ('description', models.TextField(verbose_name='Description')), + ], + options={ + 'verbose_name': 'Absence reason', + }, + ), + migrations.CreateModel( + name='Exam', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('extended_data', django.contrib.postgres.fields.jsonb.JSONField(default=dict, editable=False)), + ('date', models.DateField(null=True, verbose_name='Date of exam')), + ('periodfrom', models.IntegerField(null=True, verbose_name='Effective start period of exam')), + ('periodto', models.IntegerField(null=True, verbose_name='Effective end period of exam')), + ('title', models.CharField(max_length=50, verbose_name='Title')), + ('comment', models.TextField(verbose_name='Comment')), + ], + options={ + 'verbose_name': 'Exam', + 'ordering': ['date'], + }, + ), + migrations.CreateModel( + name='Holiday', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('extended_data', django.contrib.postgres.fields.jsonb.JSONField(default=dict, editable=False)), + ('datefrom', models.DateField(null=True, verbose_name='Effective start date of holidays')), + ('dateto', models.DateField(null=True, verbose_name='Effective end date of holidays')), + ('comments', models.TextField(verbose_name='Comments')), + ], + options={ + 'verbose_name': 'Holiday', + 'ordering': ['datefrom'], + }, + ), + migrations.AddIndex( + model_name='holiday', + index=models.Index(fields=['datefrom', 'dateto'], name='chronos_hol_datefro_36520a_idx'), + ), + migrations.AddField( + model_name='exam', + name='fk_lesson', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lesson', to='chronos.Lesson'), + ), + migrations.AddField( + model_name='absence', + name='fk_person', + field=models.ManyToManyField(related_name='fk_person', to='core.Person'), + ), + migrations.AddField( + model_name='absence', + name='fk_reason', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason', to='chronos.AbsenceReason'), + ), + migrations.AddIndex( + model_name='exam', + index=models.Index(fields=['periodfrom', 'periodto'], name='chronos_exa_periodf_2f686a_idx'), + ), + migrations.AddIndex( + model_name='absence', + index=models.Index(fields=['datefrom', 'dateto'], name='chronos_abs_datefro_d55b67_idx'), + ), + ]