# Generated by Django 5.1.9 on 2025-06-08 04:18

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


class Migration(migrations.Migration):

    dependencies = [
        (
            "access",
            "0015_remove_teamcenturionmodelnote_centurionmodelnote_ptr_and_more",
        ),
        ("core", "0031_remove_ticketcategory_is_global_and_more"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.RemoveField(
            model_name="tenant",
            name="slug",
        ),
        migrations.AlterField(
            model_name="tenant",
            name="manager",
            field=models.ForeignKey(
                blank=True,
                help_text="Manager for this Tenancy",
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to=settings.AUTH_USER_MODEL,
                verbose_name="Manager",
            ),
        ),
        migrations.AlterField(
            model_name="tenant",
            name="model_notes",
            field=models.TextField(
                blank=True,
                help_text="Tid bits of information",
                null=True,
                verbose_name="Notes",
            ),
        ),
        migrations.CreateModel(
            name="TenantAuditHistory",
            fields=[
                (
                    "centurionaudit_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionaudit",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this history belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="audit_history",
                        to="access.tenant",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Tenant History",
                "verbose_name_plural": "Tenant Histories",
                "db_table": "access_tenant_audithistory",
                "managed": True,
            },
            bases=("core.centurionaudit", models.Model),
        ),
        migrations.CreateModel(
            name="TenantCenturionModelNote",
            fields=[
                (
                    "centurionmodelnote_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionmodelnote",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this note belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="access.tenant",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Tenant Note",
                "verbose_name_plural": "Tenant Notes",
                "db_table": "access_tenant_centurionmodelnote",
                "managed": True,
            },
            bases=("core.centurionmodelnote", models.Model),
        ),
    ]
