# Generated by Django 5.0.7 on 2024-11-06 11:41

import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('django_goals', '0002_goalprogress_message'),
    ]

    operations = [
        migrations.RemoveIndex(
            model_name='goal',
            name='goals_waiting_for_worker_idx',
        ),
        migrations.AddField(
            model_name='goal',
            name='deadline',
            field=models.DateTimeField(default=django.utils.timezone.now, help_text='Goals having deadline sooner will be pursued first.'),
        ),
        migrations.AddIndex(
            model_name='goal',
            index=models.Index(condition=models.Q(('state', 'waiting_for_worker')), fields=['deadline'], name='goals_waiting_for_worker_idx'),
        ),
    ]
