# Generated by Django 4.2.7 on 2023-12-03 15:47

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        (
            "edc_metadata",
            "0026_rename_model_verbose_name_crfmetadata_document_name_and_more",
        ),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="crfmetadata",
            options={
                "default_manager_name": "objects",
                "default_permissions": (
                    "add",
                    "change",
                    "delete",
                    "view",
                    "export",
                    "import",
                ),
                "verbose_name": "Crf collection status",
                "verbose_name_plural": "Crf collection status",
            },
        ),
        migrations.AlterModelOptions(
            name="requisitionmetadata",
            options={
                "default_manager_name": "objects",
                "default_permissions": (
                    "add",
                    "change",
                    "delete",
                    "view",
                    "export",
                    "import",
                ),
                "verbose_name": "Requisition collection status",
                "verbose_name_plural": "Requisition collection status",
            },
        ),
        migrations.RemoveIndex(
            model_name="crfmetadata",
            name="edc_metadat_subject_1b2c7e_idx",
        ),
        migrations.RemoveIndex(
            model_name="requisitionmetadata",
            name="edc_metadat_subject_fb1a00_idx",
        ),
        migrations.AlterUniqueTogether(
            name="crfmetadata",
            unique_together=set(),
        ),
        migrations.AddField(
            model_name="crfmetadata",
            name="locale_created",
            field=models.CharField(
                blank=True,
                help_text="Auto-updated by Modeladmin",
                max_length=10,
                null=True,
                verbose_name="Locale created",
            ),
        ),
        migrations.AddField(
            model_name="crfmetadata",
            name="locale_modified",
            field=models.CharField(
                blank=True,
                help_text="Auto-updated by Modeladmin",
                max_length=10,
                null=True,
                verbose_name="Locale modified",
            ),
        ),
        migrations.AddField(
            model_name="requisitionmetadata",
            name="locale_created",
            field=models.CharField(
                blank=True,
                help_text="Auto-updated by Modeladmin",
                max_length=10,
                null=True,
                verbose_name="Locale created",
            ),
        ),
        migrations.AddField(
            model_name="requisitionmetadata",
            name="locale_modified",
            field=models.CharField(
                blank=True,
                help_text="Auto-updated by Modeladmin",
                max_length=10,
                null=True,
                verbose_name="Locale modified",
            ),
        ),
        migrations.AlterField(
            model_name="crfmetadata",
            name="entry_status",
            field=models.CharField(
                choices=[
                    ("REQUIRED", "New"),
                    ("KEYED", "Keyed"),
                    ("missed", "Missed"),
                    ("NOT_REQUIRED", "Not required"),
                ],
                default="REQUIRED",
                max_length=25,
            ),
        ),
        migrations.AlterField(
            model_name="requisitionmetadata",
            name="entry_status",
            field=models.CharField(
                choices=[
                    ("REQUIRED", "New"),
                    ("KEYED", "Keyed"),
                    ("missed", "Missed"),
                    ("NOT_REQUIRED", "Not required"),
                ],
                default="REQUIRED",
                max_length=25,
            ),
        ),
        migrations.AddIndex(
            model_name="crfmetadata",
            index=models.Index(
                fields=[
                    "site",
                    "entry_status",
                    "visit_code",
                    "visit_code_sequence",
                    "model",
                    "subject_identifier",
                    "schedule_name",
                    "visit_schedule_name",
                ],
                name="edc_metadata_crfm_site_ent_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="crfmetadata",
            index=models.Index(
                fields=[
                    "subject_identifier",
                    "visit_schedule_name",
                    "schedule_name",
                    "visit_code",
                    "visit_code_sequence",
                    "model",
                    "entry_status",
                    "timepoint",
                    "show_order",
                ],
                name="edc_metadata_crfm_subjid_v_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="requisitionmetadata",
            index=models.Index(
                fields=[
                    "site",
                    "entry_status",
                    "visit_code",
                    "visit_code_sequence",
                    "model",
                    "panel_name",
                    "subject_identifier",
                    "schedule_name",
                    "visit_schedule_name",
                ],
                name="edc_metadat_site_id_cc31cf_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",
                    "show_order",
                ],
                name="edc_metadat_subject_51288a_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="requisitionmetadata",
            index=models.Index(
                fields=[
                    "entry_status",
                    "model",
                    "panel_name",
                    "schedule_name",
                    "subject_identifier",
                    "visit_code",
                    "visit_code_sequence",
                    "visit_schedule_name",
                ],
                name="edc_metadat_entry_s_865e45_idx",
            ),
        ),
        migrations.AddConstraint(
            model_name="crfmetadata",
            constraint=models.UniqueConstraint(
                fields=(
                    "subject_identifier",
                    "visit_schedule_name",
                    "schedule_name",
                    "visit_code",
                    "visit_code_sequence",
                    "model",
                ),
                name="edc_metadata_crfmetadata_subject_iden_visit_uniq",
            ),
        ),
    ]
