# Generated by Django 4.2.20 on 2025-05-29 16:06

import django.db.models.fields.json
from django.db import migrations, models

import debusine.artifacts.models


class Migration(migrations.Migration):
    dependencies = [
        ('db', '0010_add_archive_singleton_collection_data'),
    ]
    replaces = [
        ('db', '0152_collectionitem_db_ci_archive_index_path_idx'),
    ]

    operations = [
        migrations.AddIndex(
            model_name='collectionitem',
            index=models.Index(
                models.F('parent_collection'),
                django.db.models.fields.json.KeyTextTransform('path', 'data'),
                condition=models.Q(
                    (
                        'category',
                        debusine.artifacts.models.ArtifactCategory[
                            'REPOSITORY_INDEX'
                        ],
                    ),
                    ('child_type', 'a'),
                    (
                        'parent_category',
                        debusine.artifacts.models.CollectionCategory['ARCHIVE'],
                    ),
                ),
                name='db_ci_archive_index_path_idx',
            ),
        ),
    ]
