chrono/chrono/agendas/migrations/0114_auto_20220324_1702.py

81 lines
2.8 KiB
Python

# Generated by Django 2.2.19 on 2022-03-24 16:02
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('agendas', '0113_auto_20220323_1708'),
]
operations = [
migrations.CreateModel(
name='SharedCustodyHolidayRule',
fields=[
(
'id',
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
(
'years',
models.CharField(
blank=True,
choices=[('', 'All'), ('even', 'Even'), ('odd', 'Odd')],
max_length=16,
verbose_name='Years',
),
),
(
'periodicity',
models.CharField(
blank=True,
choices=[
('first-half', 'First half'),
('second-half', 'Second half'),
('first-and-third-quarters', 'First and third quarters'),
('second-and-fourth-quarters', 'Second and fourth quarters'),
],
max_length=32,
verbose_name='Periodicity',
),
),
(
'agenda',
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name='holiday_rules',
to='agendas.SharedCustodyAgenda',
),
),
(
'guardian',
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to='agendas.Person',
verbose_name='Guardian',
),
),
(
'holiday',
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to='agendas.TimePeriodExceptionGroup',
verbose_name='Holiday',
),
),
],
options={
'ordering': ['holiday__label', 'guardian', 'years', 'periodicity'],
},
),
migrations.AddField(
model_name='sharedcustodyperiod',
name='holiday_rule',
field=models.ForeignKey(
null=True, on_delete=django.db.models.deletion.CASCADE, to='agendas.SharedCustodyHolidayRule'
),
),
]