# Generated by Django 6.0 on 2026-01-14 23:14

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("edc_pharmacy", "0092_confirmationatlocationitem_and_more"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="confirmationatlocation",
            options={
                "default_manager_name": "objects",
                "default_permissions": (
                    "add",
                    "change",
                    "delete",
                    "view",
                    "export",
                    "import",
                ),
                "verbose_name": "Stock confirmation at location ",
                "verbose_name_plural": "Stock confirmations at location",
            },
        ),
        migrations.AlterModelOptions(
            name="confirmationatlocationitem",
            options={
                "default_manager_name": "objects",
                "default_permissions": (
                    "add",
                    "change",
                    "delete",
                    "view",
                    "export",
                    "import",
                ),
                "verbose_name": "Stock confirmation item at location",
                "verbose_name_plural": "Stock confirmation items at location",
            },
        ),
        migrations.AlterModelOptions(
            name="historicalconfirmationatlocation",
            options={
                "get_latest_by": ("history_date", "history_id"),
                "ordering": ("-history_date", "-history_id"),
                "verbose_name": "historical Stock confirmation at location ",
                "verbose_name_plural": "historical Stock confirmations at location",
            },
        ),
        migrations.AlterModelOptions(
            name="historicalconfirmationatlocationitem",
            options={
                "get_latest_by": ("history_date", "history_id"),
                "ordering": ("-history_date", "-history_id"),
                "verbose_name": "historical Stock confirmation item at location",
                "verbose_name_plural": "historical Stock confirmation items at location",
            },
        ),
        migrations.RenameField(
            model_name="confirmationatlocationitem",
            old_name="confirmation_at_site",
            new_name="confirm_at_location",
        ),
        migrations.RenameField(
            model_name="historicalconfirmationatlocationitem",
            old_name="confirmation_at_site",
            new_name="confirm_at_location",
        ),
        migrations.RenameIndex(
            model_name="confirmationatlocation",
            new_name="edc_pharmac_modifie_1070d2_idx",
            old_name="edc_pharmac_modifie_0b23c2_idx",
        ),
        migrations.RenameIndex(
            model_name="confirmationatlocation",
            new_name="edc_pharmac_user_mo_1e1158_idx",
            old_name="edc_pharmac_user_mo_2f1be6_idx",
        ),
        migrations.RenameIndex(
            model_name="confirmationatlocationitem",
            new_name="edc_pharmac_modifie_43202e_idx",
            old_name="edc_pharmac_modifie_d7c6b9_idx",
        ),
        migrations.RenameIndex(
            model_name="confirmationatlocationitem",
            new_name="edc_pharmac_user_mo_3fe769_idx",
            old_name="edc_pharmac_user_mo_0acc89_idx",
        ),
        migrations.AddField(
            model_name="confirmationatlocationitem",
            name="code",
            field=models.CharField(
                blank=True,
                default="",
                editable=False,
                max_length=15,
                verbose_name="Stock code",
            ),
        ),
        migrations.AddField(
            model_name="confirmationatlocationitem",
            name="location_name",
            field=models.CharField(
                blank=True,
                default="",
                editable=False,
                max_length=100,
                verbose_name="Location name",
            ),
        ),
        migrations.AddField(
            model_name="confirmationatlocationitem",
            name="stock_transfer_item",
            field=models.OneToOneField(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="edc_pharmacy.stocktransferitem",
            ),
        ),
        migrations.AddField(
            model_name="historicalconfirmationatlocationitem",
            name="code",
            field=models.CharField(
                blank=True,
                default="",
                editable=False,
                max_length=15,
                verbose_name="Stock code",
            ),
        ),
        migrations.AddField(
            model_name="historicalconfirmationatlocationitem",
            name="location_name",
            field=models.CharField(
                blank=True,
                default="",
                editable=False,
                max_length=100,
                verbose_name="Location name",
            ),
        ),
        migrations.AddField(
            model_name="historicalconfirmationatlocationitem",
            name="stock_transfer_item",
            field=models.ForeignKey(
                blank=True,
                db_constraint=False,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="+",
                to="edc_pharmacy.stocktransferitem",
            ),
        ),
        migrations.AddField(
            model_name="historicalstock",
            name="returned",
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name="historicalstocktransferitem",
            name="code",
            field=models.CharField(
                blank=True,
                default="",
                editable=False,
                max_length=15,
                verbose_name="Stock code",
            ),
        ),
        migrations.AddField(
            model_name="historicalstoragebinitem",
            name="code",
            field=models.CharField(
                blank=True,
                default="",
                editable=False,
                max_length=15,
                verbose_name="Stock code",
            ),
        ),
        migrations.AddField(
            model_name="stock",
            name="returned",
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name="stocktransferitem",
            name="code",
            field=models.CharField(
                blank=True,
                default="",
                editable=False,
                max_length=15,
                verbose_name="Stock code",
            ),
        ),
        migrations.AddField(
            model_name="storagebinitem",
            name="code",
            field=models.CharField(
                blank=True,
                default="",
                editable=False,
                max_length=15,
                verbose_name="Stock code",
            ),
        ),
        migrations.AlterField(
            model_name="confirmationatlocationitem",
            name="stock",
            field=models.OneToOneField(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="edc_pharmacy.stock",
            ),
        ),
        migrations.AlterField(
            model_name="historicalstocktransfer",
            name="from_location",
            field=models.ForeignKey(
                blank=True,
                db_constraint=False,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="+",
                to="edc_pharmacy.location",
            ),
        ),
        migrations.AlterField(
            model_name="historicalstocktransfer",
            name="to_location",
            field=models.ForeignKey(
                blank=True,
                db_constraint=False,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="+",
                to="edc_pharmacy.location",
            ),
        ),
        migrations.AlterField(
            model_name="historicalstoragebinitem",
            name="stock",
            field=models.ForeignKey(
                blank=True,
                db_constraint=False,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="+",
                to="edc_pharmacy.stock",
            ),
        ),
        migrations.AlterField(
            model_name="stocktransfer",
            name="from_location",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name="from_location",
                to="edc_pharmacy.location",
            ),
        ),
        migrations.AlterField(
            model_name="stocktransfer",
            name="to_location",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name="to_location",
                to="edc_pharmacy.location",
            ),
        ),
        migrations.AlterField(
            model_name="stocktransferitem",
            name="stock",
            field=models.ForeignKey(
                limit_choices_to={"allocation__isnull": False},
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="edc_pharmacy.stock",
            ),
        ),
        migrations.AlterField(
            model_name="storagebinitem",
            name="stock",
            field=models.OneToOneField(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="edc_pharmacy.stock",
            ),
        ),
    ]
