# Generated by Django 5.2.8 on 2025-12-06 15:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("content", "0002_initial"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name="contentsample",
            name="user",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL,
            ),
        ),
        migrations.AddField(
            model_name="contentclassification",
            name="sample",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="classifications",
                to="content.contentsample",
            ),
        ),
        migrations.AddField(
            model_name="contentclassification",
            name="tag",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="classifications",
                to="content.contenttag",
            ),
        ),
        migrations.AddConstraint(
            model_name="contentsample",
            constraint=models.UniqueConstraint(
                condition=models.Q(("hash", ""), _negated=True),
                fields=("hash",),
                name="nodes_contentsample_hash_unique",
            ),
        ),
        migrations.AlterUniqueTogether(
            name="contentclassification",
            unique_together={("sample", "classifier", "tag")},
        ),
    ]
