# Generated by Django 4.2.7 on 2023-12-04 22:19

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("edc_metadata", "0027_alter_crfmetadata_options_and_more"),
    ]

    operations = [
        migrations.RemoveIndex(
            model_name="requisitionmetadata",
            name="edc_metadat_subject_51288a_idx",
        ),
        migrations.RemoveIndex(
            model_name="requisitionmetadata",
            name="edc_metadat_entry_s_865e45_idx",
        ),
        migrations.RenameIndex(
            model_name="crfmetadata",
            new_name="edc_metadat_site_id_d3b213_idx",
            old_name="edc_metadata_crfm_site_ent_idx",
        ),
        migrations.RenameIndex(
            model_name="crfmetadata",
            new_name="edc_metadat_subject_dd4400_idx",
            old_name="edc_metadata_crfm_subjid_v_idx",
        ),
        migrations.AlterUniqueTogether(
            name="requisitionmetadata",
            unique_together=set(),
        ),
        migrations.AddIndex(
            model_name="crfmetadata",
            index=models.Index(
                fields=["subject_identifier"], name="edc_metadat_subject_25f5bc_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="crfmetadata",
            index=models.Index(
                fields=["modified", "created"], name="edc_metadat_modifie_948bce_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="crfmetadata",
            index=models.Index(
                fields=["user_modified", "user_created"],
                name="edc_metadat_user_mo_10db17_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="requisitionmetadata",
            index=models.Index(
                fields=["subject_identifier"], name="edc_metadat_subject_feb080_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="requisitionmetadata",
            index=models.Index(
                fields=["modified", "created"], name="edc_metadat_modifie_be0dc2_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="requisitionmetadata",
            index=models.Index(
                fields=["user_modified", "user_created"],
                name="edc_metadat_user_mo_a239a3_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="requisitionmetadata",
            index=models.Index(
                fields=[
                    "subject_identifier",
                    "visit_schedule_name",
                    "schedule_name",
                    "visit_code",
                    "visit_code_sequence",
                    "model",
                    "panel_name",
                    "entry_status",
                    "timepoint",
                    "show_order",
                ],
                name="edc_metadat_subject_04cc77_idx",
            ),
        ),
        migrations.AddConstraint(
            model_name="requisitionmetadata",
            constraint=models.UniqueConstraint(
                fields=(
                    "subject_identifier",
                    "visit_schedule_name",
                    "schedule_name",
                    "visit_code",
                    "visit_code_sequence",
                    "model",
                    "panel_name",
                ),
                name="edc_metadata_requisitionmetadata_subject_iden_visit_uniq",
            ),
        ),
    ]
