# Generated by Django 4.2.19 on 2025-04-10 08:15

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Chunk",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("checksum", models.CharField(max_length=40, unique=True)),
                ("size", models.PositiveIntegerField()),
                ("data", models.BinaryField()),
            ],
        ),
        migrations.CreateModel(
            name="File",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("checksum", models.CharField(max_length=40, unique=True)),
                ("filename", models.CharField(max_length=255)),
                ("size", models.PositiveIntegerField()),
                ("data", models.BinaryField()),
            ],
        ),
        migrations.CreateModel(
            name="FileMetadata",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("debug_id", models.UUIDField(blank=True, null=True)),
                ("file_type", models.CharField(blank=True, max_length=255, null=True)),
                ("data", models.TextField()),
                (
                    "file",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="metadatas",
                        to="files.file",
                    ),
                ),
            ],
            options={
                "unique_together": {("debug_id", "file_type")},
            },
        ),
    ]
