# Generated by Django 6.0.2 on 2026-02-09 09:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("dbp_media_library", "0001_initial"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name="folder",
            name="edited_by",
            field=models.ForeignKey(
                editable=False,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="%(app_label)s_%(class)s_edited",
                to=settings.AUTH_USER_MODEL,
                verbose_name="Edited by",
            ),
        ),
        migrations.AddField(
            model_name="folder",
            name="parent",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="children",
                to="dbp_media_library.folder",
            ),
        ),
        migrations.AddField(
            model_name="media",
            name="edited_by",
            field=models.ForeignKey(
                editable=False,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="%(app_label)s_%(class)s_edited",
                to=settings.AUTH_USER_MODEL,
                verbose_name="Edited by",
            ),
        ),
        migrations.AddField(
            model_name="media",
            name="folder",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="media",
                to="dbp_media_library.folder",
                verbose_name="Folder",
            ),
        ),
        migrations.AlterUniqueTogether(
            name="folder",
            unique_together={("name", "parent")},
        ),
    ]
