# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-03-22 14:53
from __future__ import unicode_literals

from django.db import migrations

from ..models import IndexEntry


table = IndexEntry._meta.db_table


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('wagtail_pgsearchbackend', '0001_initial'),
    ]

    operations = [
        migrations.RunSQL(
            'CREATE INDEX IF NOT EXISTS {0}_body_search ON {0} '
            'USING GIN(body_search);'.format(table),
            'DROP INDEX IF EXISTS {}_body_search;'.format(table),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-03-22 14:53
from __future__ import unicode_literals

from django.db import migrations

from ..models import IndexEntry


table = IndexEntry._meta.db_table


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('wagtail_pgsearchbackend', '0001_initial'),
    ]

    operations = [
        migrations.RunSQL(
            'CREATE INDEX {0}_body_search ON {0} '
            'USING GIN(body_search);'.format(table),
            'DROP INDEX IF EXISTS {}_body_search;'.format(table),
        ),
    ]

Fix migration for Postgres < 9.5
Fix migration for Postgres < 9.5
