# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-11-07 15:28
from __future__ import unicode_literals

from django.db import migrations
from django.contrib.postgres.operations import TrigramExtension

from api.migrations import PostgresOnlyMigration


class Migration(PostgresOnlyMigration):

    dependencies = [
        ('api', '0040_remove_module_enabled'),
    ]

    operations = [
        TrigramExtension(),
        migrations.RunSQL("create index api_message_subject_gin on api_message using gin(to_tsvector('english', subject::text));",
                          "drop index api_message_subject_gin"),
        migrations.RunSQL("create index api_message_sender_gin on api_message using gin(upper(sender) gin_trgm_ops);",
                          "drop index api_message_sender_gin"),
        migrations.RunSQL("create index api_message_recipients_gin on api_message using gin(upper(recipients) gin_trgm_ops);",
                          "drop index api_message_recipients_gin"),
    ]
