# Generated by Django 5.2.3 on 2025-07-07 15:16

import uuid

import _socket
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("edc_pharmacy", "0079_remove_historicalstock_allocated_and_more"),
        ("sites", "0002_alter_domain_unique"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.RemoveField(
            model_name="historicalstock",
            name="allocated_datetime",
        ),
        migrations.RemoveField(
            model_name="historicalstock",
            name="dispensed",
        ),
        migrations.RemoveField(
            model_name="stock",
            name="allocated_datetime",
        ),
        migrations.RemoveField(
            model_name="stock",
            name="dispensed",
        ),
        migrations.AlterField(
            model_name="historicalstoragebinitem",
            name="stock",
            field=models.ForeignKey(
                blank=True,
                db_constraint=False,
                limit_choices_to={
                    "confirmed_at_site": True,
                    "dispenseitem__isnull": True,
                },
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="+",
                to="edc_pharmacy.stock",
            ),
        ),
        migrations.AlterField(
            model_name="storagebinitem",
            name="stock",
            field=models.ForeignKey(
                limit_choices_to={
                    "confirmed_at_site": True,
                    "dispenseitem__isnull": True,
                },
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="edc_pharmacy.stock",
            ),
        ),
    ]
