# Generated by Django 5.1.5 on 2025-02-01 20:33

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="ContentFile",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("machine", models.CharField(max_length=255)),
                ("build_id", models.CharField(max_length=255)),
                ("path", models.CharField(max_length=1023)),
                ("basename", models.CharField(db_index=True, max_length=255)),
                ("cpvb", models.CharField(max_length=255)),
                ("repo", models.CharField(max_length=127)),
                ("size", models.IntegerField()),
                ("timestamp", models.DateTimeField()),
            ],
            options={
                "ordering": ["machine", "timestamp"],
                "get_latest_by": ["timestamp"],
                "indexes": [
                    models.Index(
                        models.F("machine"), models.F("build_id"), name="idx_build"
                    ),
                    models.Index(
                        models.F("machine"),
                        models.F("build_id"),
                        models.F("cpvb"),
                        name="idx_build_cpvb",
                    ),
                ],
                "constraints": [
                    models.UniqueConstraint(
                        models.F("machine"),
                        models.F("build_id"),
                        models.F("cpvb"),
                        models.F("path"),
                        name="unique_path",
                    )
                ],
            },
        )
    ]
