# Generated by Django 5.1.9 on 2025-05-14 13:48

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


class Migration(migrations.Migration):

    dependencies = [
        ('access', '0008_alter_tenant_options_alter_entity_organization_and_more'),
        ('settings', '0011_appsettingshistory_externallinkhistory'),
    ]

    operations = [
        migrations.AlterField(
            model_name='appsettings',
            name='global_organization',
            field=models.ForeignKey(blank=True, default=None, help_text='Tenant global items will be created in', null=True, on_delete=django.db.models.deletion.SET_DEFAULT, related_name='global_organization', to='access.tenant', verbose_name='Global Tenant'),
        ),
        migrations.AlterField(
            model_name='appsettings',
            name='owner_organization',
            field=models.ForeignKey(blank=True, default=None, help_text='Tenant the settings belong to', null=True, on_delete=django.db.models.deletion.SET_DEFAULT, related_name='owner_organization', to='access.tenant'),
        ),
        migrations.AlterField(
            model_name='externallink',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='usersettings',
            name='default_organization',
            field=models.ForeignKey(blank=True, default=None, help_text='Users default Tenant', null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='access.tenant', verbose_name='Default Tenant'),
        ),
    ]
