# Generated by Django 5.1.6 on 2025-03-19 11:38

import aleksis.core.mixins
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('core', '0076_remove_old_address_fields'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='OrganisationAddressThrough',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('managed_by_app_label', models.CharField(blank=True, editable=False, max_length=255, verbose_name='App label of app responsible for managing this instance')),
                ('extended_data', models.JSONField(default=dict, editable=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='organisationaddressthrough',
            name='address',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.address'),
        ),
        migrations.AddField(
            model_name='organisationaddressthrough',
            name='organisation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.organisation'),
        ),
        migrations.AddField(
            model_name='organisation',
            name='addresses',
            field=models.ManyToManyField(blank=True, related_name='organisations', through='core.OrganisationAddressThrough', to='core.address', verbose_name='Addresses'),
        ),
    ]
