# Generated by Django 5.2.14 on 2026-07-05 17:53

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


class Migration(migrations.Migration):

    dependencies = [
        ('corptools', '__first__'),
        ('shop', '0022_characterblueprint_corptools'),
    ]

    operations = [
        migrations.AddField(
            model_name='shopsource',
            name='corporation_audit',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='corptools.corporationaudit'),
        ),
        migrations.AlterField(
            model_name='shopsource',
            name='character_audit',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='corptools.characteraudit'),
        ),
        migrations.AlterField(
            model_name='shopsource',
            name='location_id',
            field=models.BigIntegerField(),
        ),
        migrations.AddConstraint(
            model_name='shopsource',
            constraint=models.CheckConstraint(condition=models.Q(models.Q(('character_audit__isnull', False), ('corporation_audit__isnull', True)), models.Q(('character_audit__isnull', True), ('corporation_audit__isnull', False)), _connector='OR'), name='shopsource_exactly_one_owner'),
        ),
    ]
