# Generated by Django 2.2.14 on 2022-05-27 12:43
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ('core', '0066_system_export_to_tirole'),
    ]

    operations = [
        migrations.RunSQL(
            [
                """
                CREATE INDEX CONCURRENTLY upravlyator_rolenode_text_search_idx ON upravlyator_rolenode
                USING GIN (
                    to_tsvector(
                        'simple',
                         COALESCE(regexp_replace(slug, '[^A-Za-z0-9]', ' ', 'g'), '') || ' ' ||
                         COALESCE(regexp_replace(name, '[^A-Za-z0-9]', ' ', 'g'), '') || ' ' ||
                         COALESCE(regexp_replace(name_en, '[^A-Za-z0-9]', ' ', 'g'), '')
                    )
                );
                """
            ],
            reverse_sql=[
                """
                DROP INDEX CONCURRENTLY upravlyator_rolenode_text_search_idx;
                """
            ],
        ),
    ]
