# Generated by Django 6.0.6 on 2026-08-16 14:01

import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('features', '0002_maintenance'),
    ]

    operations = [
        migrations.CreateModel(
            name='JobRun',
            fields=[
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', models.DateTimeField(auto_now=True, verbose_name='modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('task_id', models.CharField(max_length=255, unique=True, verbose_name='task id')),
                ('name', models.CharField(help_text='Dotted Celery task name, e.g. billing.tasks.renew_subscriptions.', max_length=255, verbose_name='task name')),
                ('status', models.CharField(choices=[('started', 'Started'), ('success', 'Success'), ('failure', 'Failed')], default='started', max_length=10, verbose_name='status')),
                ('started_at', models.DateTimeField(verbose_name='started at')),
                ('finished_at', models.DateTimeField(blank=True, null=True, verbose_name='finished at')),
                ('detail', models.TextField(blank=True, help_text='What the task returned, on success.', verbose_name='detail')),
                ('error', models.TextField(blank=True, help_text='What the task raised, on failure.', verbose_name='error')),
            ],
            options={
                'verbose_name': 'job run',
                'verbose_name_plural': 'job runs',
                'ordering': ['-started_at'],
            },
        ),
    ]
