# Generated by Django 4.2.7 on 2026-01-26 15:21

import uuid

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        (
            "workflow_explorer",
            "0004_delete_workitem_remove_bandstructurecalc_run_id_and_more",
        ),
    ]

    operations = [
        migrations.CreateModel(
            name="WorkItem",
            fields=[
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                ("tags", models.JSONField(default=list)),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("P", "Pending"),
                            ("R", "Running"),
                            ("C", "Cancelled"),
                            ("E", "Errored"),
                            ("F", "Finished"),
                        ],
                        default="P",
                        max_length=1,
                    ),
                ),
                ("command_not_found_failures", models.IntegerField(default=0)),
                ("fxn", models.BinaryField()),
                ("args", models.BinaryField(default=b"\x80\x05]\x94.")),
                ("kwargs", models.BinaryField(default=b"\x80\x05}\x94.")),
                ("result_binary", models.BinaryField(blank=True, null=True)),
            ],
            options={
                "db_table": "workflow_engine__work_items",
            },
        ),
        migrations.AddField(
            model_name="bandstructurecalc",
            name="run_id",
            field=models.UUIDField(blank=True, null=True, unique=True),
        ),
        migrations.AddField(
            model_name="chemicalsystemsearch",
            name="run_id",
            field=models.UUIDField(blank=True, null=True, unique=True),
        ),
        migrations.AddField(
            model_name="densityofstatescalc",
            name="run_id",
            field=models.UUIDField(blank=True, null=True, unique=True),
        ),
        migrations.AddField(
            model_name="diffusionanalysis",
            name="run_id",
            field=models.UUIDField(blank=True, null=True, unique=True),
        ),
        migrations.AddField(
            model_name="dynamics",
            name="run_id",
            field=models.UUIDField(blank=True, null=True, unique=True),
        ),
        migrations.AddField(
            model_name="fixedcompositionsearch",
            name="run_id",
            field=models.UUIDField(blank=True, null=True, unique=True),
        ),
        migrations.AddField(
            model_name="migrationhop",
            name="run_id",
            field=models.UUIDField(blank=True, null=True, unique=True),
        ),
        migrations.AddField(
            model_name="relaxation",
            name="run_id",
            field=models.UUIDField(blank=True, null=True, unique=True),
        ),
        migrations.AddField(
            model_name="staticenergy",
            name="run_id",
            field=models.UUIDField(blank=True, null=True, unique=True),
        ),
        migrations.AddField(
            model_name="variablensitescompositionsearch",
            name="run_id",
            field=models.UUIDField(blank=True, null=True, unique=True),
        ),
    ]
