# Generated by Django 4.2.7 on 2023-11-17 20:11

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


class Migration(migrations.Migration):
    dependencies = [
        ("zilencer", "0035_remoterealmcount_remote_realm_and_more"),
        ("corporate", "0019_zulipsponsorshiprequest_expected_total_users_and_more"),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name="customer",
            name="cloud_xor_self_hosted",
        ),
        migrations.AddField(
            model_name="customer",
            name="remote_realm",
            field=models.OneToOneField(
                null=True, on_delete=django.db.models.deletion.CASCADE, to="zilencer.remoterealm"
            ),
        ),
        migrations.AddConstraint(
            model_name="customer",
            constraint=models.CheckConstraint(
                condition=models.Q(
                    ("realm__isnull", False),
                    ("remote_server__isnull", False),
                    ("remote_realm__isnull", False),
                    _connector="OR",
                ),
                name="has_associated_model_object",
            ),
        ),
    ]
