# Generated by Django 4.0.1 on 2022-04-27 13:52

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('varda', '0067_remove_henkilo_changed_by_and_more'),
    ]

    operations = [
        migrations.RemoveIndex(
            model_name='z9_relatedobjectchanged',
            name='varda_z9_re_model_n_deef3a_idx',
        ),
        migrations.AddIndex(
            model_name='z9_relatedobjectchanged',
            index=models.Index(fields=['model_name', 'changed_timestamp'], include=('instance_id', 'trigger_model_name', 'trigger_instance_id', 'history_type'), name='varda_z9_mod_time_covering'),
        ),
        migrations.RunSQL(sql='CREATE INDEX varda_historicalorganisaatio_id_date ON varda_historicalorganisaatio USING btree (id, history_date DESC);',
                          reverse_sql='DROP INDEX varda_historicalorganisaatio_id_date;'),
        migrations.RunSQL(sql='CREATE INDEX varda_historicallapsi_id_date ON varda_historicallapsi USING btree (id, history_date DESC);',
                          reverse_sql='DROP INDEX varda_historicallapsi_id_date;'),
        migrations.RunSQL(sql='CREATE INDEX varda_historicaltyontekija_id_date ON varda_historicaltyontekija USING btree (id, history_date DESC);',
                          reverse_sql='DROP INDEX varda_historicaltyontekija_id_date;')
    ]
