# Generated by Django 6.0.4 on 2026-04-17 20:55

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

import django_q.models


class Migration(migrations.Migration):
    dependencies = [
        ("django_q", "0018_task_success_index"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="task",
            options={
                "ordering": ["-stopped"],
                "verbose_name": "Task",
                "verbose_name_plural": "Tasks",
            },
        ),
        migrations.AlterField(
            model_name="ormq",
            name="key",
            field=models.CharField(
                help_text="Name of the target cluster",
                max_length=100,
                verbose_name="Cluster key",
            ),
        ),
        migrations.AlterField(
            model_name="ormq",
            name="lock",
            field=models.DateTimeField(
                help_text="Prevent any cluster from pulling until",
                null=True,
                verbose_name="Lock until",
            ),
        ),
        migrations.AlterField(
            model_name="ormq",
            name="payload",
            field=models.TextField(
                help_text="Signed serialized task package (do not edit manually).",
                verbose_name="Payload",
            ),
        ),
        migrations.AlterField(
            model_name="schedule",
            name="args",
            field=models.TextField(
                blank=True,
                help_text="e.g. 1, 2, 'John'",
                null=True,
                verbose_name="Arguments",
            ),
        ),
        migrations.AlterField(
            model_name="schedule",
            name="cluster",
            field=models.CharField(
                blank=True,
                default=None,
                help_text="Name of the target cluster",
                max_length=100,
                null=True,
                verbose_name="Cluster",
            ),
        ),
        migrations.AlterField(
            model_name="schedule",
            name="cron",
            field=models.CharField(
                blank=True,
                help_text="Cron expression",
                max_length=100,
                null=True,
                validators=[django_q.models.validate_cron],
                verbose_name="Cron",
            ),
        ),
        migrations.AlterField(
            model_name="schedule",
            name="func",
            field=models.CharField(
                help_text="e.g. module.tasks.function",
                max_length=256,
                verbose_name="Function",
            ),
        ),
        migrations.AlterField(
            model_name="schedule",
            name="hook",
            field=models.CharField(
                blank=True,
                help_text="e.g. module.tasks.result_function",
                max_length=256,
                null=True,
                verbose_name="Hook",
            ),
        ),
        migrations.AlterField(
            model_name="schedule",
            name="intended_date_kwarg",
            field=models.CharField(
                blank=True,
                help_text="Name of kwarg to pass intended schedule date",
                max_length=100,
                null=True,
                validators=[django_q.models.validate_kwarg],
                verbose_name="Intended date kwarg",
            ),
        ),
        migrations.AlterField(
            model_name="schedule",
            name="kwargs",
            field=models.TextField(
                blank=True,
                help_text="e.g. x=1, y=2, name='John'",
                null=True,
                verbose_name="Keyword arguments",
            ),
        ),
        migrations.AlterField(
            model_name="schedule",
            name="minutes",
            field=models.PositiveSmallIntegerField(
                blank=True,
                help_text="Number of minutes for the Minutes type",
                null=True,
                verbose_name="Minutes",
            ),
        ),
        migrations.AlterField(
            model_name="schedule",
            name="name",
            field=models.CharField(
                blank=True,
                help_text="Optional label to identify this schedule in the admin.",
                max_length=100,
                null=True,
                verbose_name="Name",
            ),
        ),
        migrations.AlterField(
            model_name="schedule",
            name="next_run",
            field=models.DateTimeField(
                default=django.utils.timezone.now,
                help_text="When this schedule runs next (stored in UTC).",
                null=True,
                verbose_name="Next Run",
            ),
        ),
        migrations.AlterField(
            model_name="schedule",
            name="schedule_type",
            field=models.CharField(
                choices=[
                    ("O", "Once"),
                    ("I", "Minutes"),
                    ("H", "Hourly"),
                    ("D", "Daily"),
                    ("W", "Weekly"),
                    ("BW", "Biweekly"),
                    ("M", "Monthly"),
                    ("BM", "Bimonthly"),
                    ("Q", "Quarterly"),
                    ("Y", "Yearly"),
                    ("C", "Cron"),
                ],
                default="O",
                help_text="How often this task should be enqueued.",
                max_length=2,
                verbose_name="Schedule Type",
            ),
        ),
        migrations.AlterField(
            model_name="schedule",
            name="task",
            field=models.CharField(
                editable=False,
                help_text="Id of the last task spawned from this schedule (read-only).",
                max_length=100,
                null=True,
                verbose_name="Last task id",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="args",
            field=picklefield.fields.PickledObjectField(
                editable=False,
                help_text="Pickled positional arguments (tuple).",
                null=True,
                protocol=-1,
                verbose_name="Arguments",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="attempt_count",
            field=models.IntegerField(
                default=0,
                help_text="How many times execution was attempted.",
                verbose_name="Attempt count",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="cluster",
            field=models.CharField(
                blank=True,
                default=None,
                help_text="Name of the cluster that executed this task.",
                max_length=100,
                null=True,
                verbose_name="Cluster",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="func",
            field=models.CharField(
                help_text="Dotted import path to the callable, e.g. myapp.tasks.job.",
                max_length=256,
                verbose_name="Function",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="group",
            field=models.CharField(
                editable=False,
                help_text="Optional group id to aggregate related tasks.",
                max_length=100,
                null=True,
                verbose_name="Group",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="hook",
            field=models.CharField(
                help_text="Optional dotted path to a callback that receives the task result.",
                max_length=256,
                null=True,
                verbose_name="Hook",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="id",
            field=models.CharField(
                editable=False,
                help_text="32-character task identifier.",
                max_length=32,
                primary_key=True,
                serialize=False,
                verbose_name="Task id",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="kwargs",
            field=picklefield.fields.PickledObjectField(
                editable=False,
                help_text="Pickled keyword arguments (dict).",
                null=True,
                protocol=-1,
                verbose_name="Keyword arguments",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="name",
            field=models.CharField(
                editable=False,
                help_text="Optional human-readable name for lookup and display.",
                max_length=100,
                verbose_name="Name",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="result",
            field=picklefield.fields.PickledObjectField(
                editable=False,
                help_text="Pickled return value or error payload.",
                null=True,
                protocol=-1,
                verbose_name="Result",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="started",
            field=models.DateTimeField(
                editable=False,
                help_text="When the worker started executing the task.",
                verbose_name="Started at",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="stopped",
            field=models.DateTimeField(
                editable=False,
                help_text="When the worker finished (success or failure).",
                verbose_name="Stopped at",
            ),
        ),
        migrations.AlterField(
            model_name="task",
            name="success",
            field=models.BooleanField(
                default=True,
                editable=False,
                help_text="False if the task raised an exception or timed out.",
                verbose_name="Success",
            ),
        ),
    ]
