# -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-08-05 15:20
from __future__ import unicode_literals

import django.contrib.postgres.search
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0005_tasawardmatview'),
    ]

    operations = [
        migrations.CreateModel(
            name='TASAutocompleteMatview',
            fields=[
                ('tas_autocomplete_id', models.IntegerField(primary_key=True, serialize=False)),
                ('allocation_transfer_agency_id', models.TextField(null=True)),
                ('agency_id', models.TextField()),
                ('beginning_period_of_availability', models.TextField(null=True)),
                ('ending_period_of_availability', models.TextField(null=True)),
                ('availability_type_code', models.TextField(null=True)),
                ('main_account_code', models.TextField()),
                ('sub_account_code', models.TextField(null=True)),
                ('tas_rendering_label', models.TextField()),
            ],
            options={
                'db_table': 'tas_autocomplete_matview',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='TASSearchMatview',
            fields=[
                ('award_id', models.BigIntegerField(primary_key=True, serialize=False)),
                ('tas_ts_vector', django.contrib.postgres.search.SearchVectorField()),
            ],
            options={
                'db_table': 'tas_search_matview',
                'managed': False,
            },
        ),
        migrations.RunSQL(
            sql=[
                'drop materialized view if exists tas_award_matview',
                'drop materialized view if exists tas_award_matview_old',
                'drop materialized view if exists tas_award_matview_temp',
            ],
        ),
    ]
