# Generated by Django 5.2 on 2025-08-14 16:58

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0087_add_root_level_unique_constraint'),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name='agentfsnode',
            name='unique_name_per_directory',
        ),
        migrations.RemoveConstraint(
            model_name='agentfsnode',
            name='unique_name_per_filespace_root',
        ),
        migrations.AddConstraint(
            model_name='agentfsnode',
            constraint=models.UniqueConstraint(condition=models.Q(('is_deleted', False)), fields=('filespace', 'parent', 'name'), name='unique_name_per_directory'),
        ),
        migrations.AddConstraint(
            model_name='agentfsnode',
            constraint=models.UniqueConstraint(condition=models.Q(('is_deleted', False), ('parent__isnull', True)), fields=('filespace', 'name'), name='unique_name_per_filespace_root'),
        ),
    ]
