51 lines
1.5 KiB
Python
51 lines
1.5 KiB
Python
# Generated by Django 2.2.26 on 2022-10-13 13:46
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('agendas', '0139_auto_20220726_1017'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AlterModelOptions(
|
|
name='timeperiod',
|
|
options={'ordering': ['weekday', 'date', 'start_time']},
|
|
),
|
|
migrations.AddField(
|
|
model_name='timeperiod',
|
|
name='date',
|
|
field=models.DateField(null=True, verbose_name='Date'),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='timeperiod',
|
|
name='weekday',
|
|
field=models.IntegerField(
|
|
choices=[
|
|
(0, 'Monday'),
|
|
(1, 'Tuesday'),
|
|
(2, 'Wednesday'),
|
|
(3, 'Thursday'),
|
|
(4, 'Friday'),
|
|
(5, 'Saturday'),
|
|
(6, 'Sunday'),
|
|
],
|
|
null=True,
|
|
verbose_name='Week day',
|
|
),
|
|
),
|
|
migrations.AddConstraint(
|
|
model_name='timeperiod',
|
|
constraint=models.CheckConstraint(
|
|
check=models.Q(
|
|
models.Q(('date__isnull', True), ('weekday__isnull', False)),
|
|
models.Q(('date__isnull', False), ('weekday__isnull', True)),
|
|
_connector='OR',
|
|
),
|
|
name='date_xor_weekday',
|
|
),
|
|
),
|
|
]
|