# Generated by Django 4.2.23 on 2025-12-29 22:41

# Django
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("indy_hub", "0050_populate_order_references"),
    ]

    operations = [
        # Add unique constraint to buy order reference
        migrations.AlterField(
            model_name="materialexchangebuyorder",
            name="order_reference",
            field=models.CharField(
                blank=True,
                db_index=True,
                help_text="Unique order reference (INDY-{id}) for contract matching",
                max_length=50,
                unique=True,
            ),
        ),
        # Ensure sell order reference has the constraint (should already exist from column creation)
        migrations.AlterField(
            model_name="materialexchangesellorder",
            name="order_reference",
            field=models.CharField(
                blank=True,
                db_index=True,
                help_text="Unique order reference (INDY-{id}) for contract matching",
                max_length=50,
                unique=True,
            ),
        ),
    ]
