# Generated by Django 2.2.28 on 2023-11-23 13:16

from django.db import (
    migrations,
)


FILE_UPLOAD_STATUS_FINISHED = 2

CREATE_INDEX_SQL = """
    CREATE INDEX rdm_exporting_data_sub_sta_file_upload_status ON public.rdm_exporting_data_sub_stage_uploader_client_log
    USING btree(file_upload_status)
    WHERE file_upload_status != %s;
"""

DROP_INDEX_SQL = """
    DROP INDEX IF EXISTS rdm_exporting_data_sub_sta_file_upload_status;
"""


class Migration(migrations.Migration):

    dependencies = [
        ('edu_rdm_integration', '0002_init_data_uploadstatus'),
    ]

    operations = [
        migrations.RunSQL(
            [(CREATE_INDEX_SQL, [FILE_UPLOAD_STATUS_FINISHED])],
            DROP_INDEX_SQL,
        )
    ]
