# Generated by Django 5.1.15 on 2026-01-23 16:22

import django.contrib.postgres.indexes
import django.contrib.postgres.search
from django.contrib.postgres.operations import TrigramExtension
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('django_spire_core', '0001_initial'),
        ('django_spire_knowledge', '0009_alter_collection_tags_alter_entry_tags'),
    ]

    operations = [
        TrigramExtension(),
        migrations.AddField(
            model_name='entry',
            name='_search_text',
            field=models.TextField(blank=True, default=''),
        ),
        migrations.AddField(
            model_name='entry',
            name='_search_vector',
            field=django.contrib.postgres.search.SearchVectorField(null=True),
        ),
        migrations.AddIndex(
            model_name='entry',
            index=django.contrib.postgres.indexes.GinIndex(fields=['_search_vector'], name='entry_search_vector_idx'),
        ),
        migrations.AddIndex(
            model_name='entry',
            index=django.contrib.postgres.indexes.GinIndex(fields=['name'], name='entry_name_trgm_idx', opclasses=['gin_trgm_ops']),
        ),
        migrations.AddIndex(
            model_name='entry',
            index=django.contrib.postgres.indexes.GinIndex(fields=['_search_text'], name='entry_search_text_trgm_idx', opclasses=['gin_trgm_ops']),
        ),
    ]
