<commit_before># Generated by Django 3.2.6 on 2021-09-27 17:49

from django.db import migrations

INDEX_POLLSTATS_ORG_RESULT_SQL = """
CREATE INDEX IF NOT EXISTS stats_pollstats_org_result on stats_pollstats (org_id, flow_result_id) WHERE flow_result_id IS NOT NULL;
"""


INDEX_POLLSTATS_ORG_QST_RST_CAT_SQL = """
CREATE INDEX IF NOT EXISTS stats_pollstats_org_qstn_rslt_cat_age_gndr_schm_date_not_null on stats_pollstats (org_id, question_id, flow_result_id, category_id, flow_result_category_id, age_segment_id, gender_segment_id, scheme_segment_id, location_id, date) WHERE date IS NOT NULL;
"""


class Migration(migrations.Migration):

    dependencies = [
        ("stats", "0016_pollstats_scheme_segment"),
    ]

    operations = [
        migrations.RunSQL(INDEX_POLLSTATS_ORG_RESULT_SQL),
        migrations.RunSQL(INDEX_POLLSTATS_ORG_QST_RST_CAT_SQL),
    ]<commit_msg>Add empty reverse migration to be able to unapply the migration in reverse<commit_after># Generated by Django 3.2.6 on 2021-09-27 17:49

from django.db import migrations

INDEX_POLLSTATS_ORG_RESULT_SQL = """
CREATE INDEX IF NOT EXISTS stats_pollstats_org_result on stats_pollstats (org_id, flow_result_id) WHERE flow_result_id IS NOT NULL;
"""


INDEX_POLLSTATS_ORG_QST_RST_CAT_SQL = """
CREATE INDEX IF NOT EXISTS stats_pollstats_org_qstn_rslt_cat_age_gndr_schm_date_not_null on stats_pollstats (org_id, question_id, flow_result_id, category_id, flow_result_category_id, age_segment_id, gender_segment_id, scheme_segment_id, location_id, date) WHERE date IS NOT NULL;
"""


class Migration(migrations.Migration):

    dependencies = [
        ("stats", "0016_pollstats_scheme_segment"),
    ]

    operations = [
        migrations.RunSQL(INDEX_POLLSTATS_ORG_RESULT_SQL, ""),
        migrations.RunSQL(INDEX_POLLSTATS_ORG_QST_RST_CAT_SQL, ""),
    ]
{'fraction_non_alphanumeric': 0.07536865101037685, 'fraction_numerical': 0.02075368651010377, 'mean_word_length': 5.810408921933085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2266722', 'n_tokens_mistral': 682, 'n_tokens_neox': 648, 'n_words': 132}