# Generated by Django 4.2.15 on 2024-11-25 12:23

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

import debusine.artifacts.models


class Migration(migrations.Migration):
    dependencies = [
        ('db', '0100_name_validation'),
    ]

    operations = [
        migrations.AddIndex(
            model_name='collectionitem',
            index=models.Index(
                models.F('parent_collection'),
                django.db.models.fields.json.KeyTextTransform(
                    'package', 'data'
                ),
                django.db.models.fields.json.KeyTextTransform(
                    'version', 'data'
                ),
                condition=models.Q(
                    (
                        'category',
                        debusine.artifacts.models.ArtifactCategory[
                            'SOURCE_PACKAGE'
                        ],
                    ),
                    ('child_type', 'a'),
                    (
                        'parent_category',
                        debusine.artifacts.models.CollectionCategory['SUITE'],
                    ),
                ),
                name='db_ci_suite_source_idx',
            ),
        ),
        migrations.AddIndex(
            model_name='collectionitem',
            index=models.Index(
                models.F('parent_collection'),
                django.db.models.fields.json.KeyTextTransform(
                    'srcpkg_name', 'data'
                ),
                django.db.models.fields.json.KeyTextTransform(
                    'srcpkg_version', 'data'
                ),
                condition=models.Q(
                    (
                        'category',
                        debusine.artifacts.models.ArtifactCategory[
                            'BINARY_PACKAGE'
                        ],
                    ),
                    ('child_type', 'a'),
                    (
                        'parent_category',
                        debusine.artifacts.models.CollectionCategory['SUITE'],
                    ),
                ),
                name='db_ci_suite_binary_source_idx',
            ),
        ),
    ]
