# -*- coding: utf-8 -*-


from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('data', '0015_add_esp_allele_frequency_fields'),
    ]

    operations = [
        migrations.AddField(
            model_name='report',
            name='Allele_count_AFR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_count_AMR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_count_EAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_count_FIN_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_count_NFE_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_count_OTH_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_count_SAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_frequency_AFR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_frequency_AMR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_frequency_EAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_frequency_FIN_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_frequency_NFE_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_frequency_OTH_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_frequency_SAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_number_AFR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_number_AMR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_number_EAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_number_FIN_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_number_NFE_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_number_OTH_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Allele_number_SAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Homozygous_count_AFR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Homozygous_count_AMR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Homozygous_count_EAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Homozygous_count_FIN_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Homozygous_count_NFE_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Homozygous_count_OTH_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='Homozygous_count_SAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_count_AFR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_count_AMR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_count_EAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_count_FIN_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_count_NFE_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_count_OTH_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_count_SAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_frequency_AFR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_frequency_AMR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_frequency_EAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_frequency_FIN_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_frequency_NFE_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_frequency_OTH_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_frequency_SAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_number_AFR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_number_AMR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_number_EAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_number_FIN_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_number_NFE_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_number_OTH_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Allele_number_SAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Homozygous_count_AFR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Homozygous_count_AMR_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Homozygous_count_EAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Homozygous_count_FIN_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Homozygous_count_NFE_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Homozygous_count_OTH_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='variant',
            name='Homozygous_count_SAS_ExAC',
            field=models.TextField(default='-'),
            preserve_default=False,
        ),
        migrations.RunSQL(
            """
            DROP MATERIALIZED VIEW IF EXISTS currentvariant;
            CREATE MATERIALIZED VIEW currentvariant AS (
                SELECT * FROM "variant" WHERE (
                    "id" IN ( SELECT DISTINCT ON ("Genomic_Coordinate_hg38") "id" FROM "variant" ORDER BY "Genomic_Coordinate_hg38" ASC, "Data_Release_id" DESC )
                )
            );
            """
        ),
    ]
