# Generated by Django 5.2.7 on 2025-10-09 15:37

import django.db.models.deletion
import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("authentik_tasks", "0004_remove_task_notify_enqueueing_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="TaskLog",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4, editable=False, primary_key=True, serialize=False
                    ),
                ),
                ("event", models.TextField()),
                ("log_level", models.TextField()),
                ("logger", models.TextField()),
                ("timestamp", models.DateTimeField()),
                ("attributes", models.JSONField()),
                ("previous", models.BooleanField(db_index=True, default=False)),
                (
                    "task",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="tasklogs",
                        to="authentik_tasks.task",
                    ),
                ),
            ],
            options={
                "verbose_name": "Task log",
                "verbose_name_plural": "Task logs",
                "default_permissions": [],
                "indexes": [
                    models.Index(fields=["task", "previous"], name="authentik_t_task_id_aa504e_idx")
                ],
            },
        ),
    ]
