# Generated by Django 5.1.10 on 2025-08-15 03:21

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


class Migration(migrations.Migration):

    dependencies = [
        ("access", "0011_remove_entitynotes_model_and_more"),
        ("assistance", "0007_remove_knowledgebase_is_global_and_more"),
        ("core", "0024_centurionaudit_centurionmodelnote_and_more"),
        ("project_management", "0006_alter_project_organization_and_more"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.RemoveField(
            model_name="project",
            name="is_global",
        ),
        migrations.RemoveField(
            model_name="project",
            name="slug",
        ),
        migrations.RemoveField(
            model_name="projectmilestone",
            name="is_global",
        ),
        migrations.RemoveField(
            model_name="projectmilestone",
            name="slug",
        ),
        migrations.RemoveField(
            model_name="projectstate",
            name="is_global",
        ),
        migrations.RemoveField(
            model_name="projecttype",
            name="is_global",
        ),
        migrations.AlterField(
            model_name="project",
            name="description",
            field=models.TextField(
                blank=True,
                help_text="Outline of this Project",
                null=True,
                verbose_name="Description",
            ),
        ),
        migrations.AlterField(
            model_name="project",
            name="external_ref",
            field=models.IntegerField(
                blank=True,
                help_text="External System reference",
                null=True,
                verbose_name="Reference Number",
            ),
        ),
        migrations.AlterField(
            model_name="project",
            name="external_system",
            field=models.IntegerField(
                blank=True,
                choices=[
                    (1, "Github"),
                    (2, "Gitlab"),
                    (9999, "Custom #1 (Imported)"),
                    (9998, "Custom #2 (Imported)"),
                    (9997, "Custom #3 (Imported)"),
                    (9996, "Custom #4 (Imported)"),
                    (9995, "Custom #5 (Imported)"),
                    (9994, "Custom #6 (Imported)"),
                    (9993, "Custom #7 (Imported)"),
                    (9992, "Custom #8 (Imported)"),
                    (9991, "Custom #9 (Imported)"),
                ],
                help_text="External system this item derives",
                null=True,
                verbose_name="External System",
            ),
        ),
        migrations.AlterField(
            model_name="project",
            name="id",
            field=models.AutoField(
                help_text="ID of the item",
                primary_key=True,
                serialize=False,
                unique=True,
                verbose_name="ID",
            ),
        ),
        migrations.AlterField(
            model_name="project",
            name="manager_team",
            field=models.ForeignKey(
                blank=True,
                help_text="Team which contains the Project Managers",
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="access.team",
                verbose_name="Project Manager Team",
            ),
        ),
        migrations.AlterField(
            model_name="project",
            name="manager_user",
            field=models.ForeignKey(
                blank=True,
                help_text="User who is the Project Manager",
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name="manager_user",
                to=settings.AUTH_USER_MODEL,
                verbose_name="Manager",
            ),
        ),
        migrations.AlterField(
            model_name="project",
            name="organization",
            field=models.ForeignKey(
                help_text="Tenant this belongs to",
                on_delete=django.db.models.deletion.CASCADE,
                related_name="+",
                to="access.tenant",
                validators=[
                    access.models.tenancy_abstract.TenancyAbstractModel.validatate_organization_exists
                ],
                verbose_name="Tenant",
            ),
        ),
        migrations.AlterField(
            model_name="project",
            name="project_type",
            field=models.ForeignKey(
                blank=True,
                help_text="Type of project",
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="project_management.projecttype",
                verbose_name="Project Type",
            ),
        ),
        migrations.AlterField(
            model_name="project",
            name="state",
            field=models.ForeignKey(
                blank=True,
                help_text="State of the project",
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="project_management.projectstate",
                verbose_name="Project State",
            ),
        ),
        migrations.AlterField(
            model_name="projectmilestone",
            name="description",
            field=models.TextField(
                blank=True,
                help_text="Description of milestone. Markdown supported",
                null=True,
                verbose_name="Description",
            ),
        ),
        migrations.AlterField(
            model_name="projectmilestone",
            name="id",
            field=models.AutoField(
                help_text="ID of the item",
                primary_key=True,
                serialize=False,
                unique=True,
                verbose_name="ID",
            ),
        ),
        migrations.AlterField(
            model_name="projectmilestone",
            name="organization",
            field=models.ForeignKey(
                help_text="Tenant this belongs to",
                on_delete=django.db.models.deletion.CASCADE,
                related_name="+",
                to="access.tenant",
                validators=[
                    access.models.tenancy_abstract.TenancyAbstractModel.validatate_organization_exists
                ],
                verbose_name="Tenant",
            ),
        ),
        migrations.AlterField(
            model_name="projectstate",
            name="id",
            field=models.AutoField(
                help_text="ID of the item",
                primary_key=True,
                serialize=False,
                unique=True,
                verbose_name="ID",
            ),
        ),
        migrations.AlterField(
            model_name="projectstate",
            name="model_notes",
            field=models.TextField(
                blank=True,
                help_text="Tid bits of information",
                null=True,
                verbose_name="Notes",
            ),
        ),
        migrations.AlterField(
            model_name="projectstate",
            name="organization",
            field=models.ForeignKey(
                help_text="Tenant this belongs to",
                on_delete=django.db.models.deletion.CASCADE,
                related_name="+",
                to="access.tenant",
                validators=[
                    access.models.tenancy_abstract.TenancyAbstractModel.validatate_organization_exists
                ],
                verbose_name="Tenant",
            ),
        ),
        migrations.AlterField(
            model_name="projectstate",
            name="runbook",
            field=models.ForeignKey(
                blank=True,
                help_text="The runbook for this project state",
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="assistance.knowledgebase",
                verbose_name="Runbook",
            ),
        ),
        migrations.AlterField(
            model_name="projecttype",
            name="id",
            field=models.AutoField(
                help_text="ID of the item",
                primary_key=True,
                serialize=False,
                unique=True,
                verbose_name="ID",
            ),
        ),
        migrations.AlterField(
            model_name="projecttype",
            name="model_notes",
            field=models.TextField(
                blank=True,
                help_text="Tid bits of information",
                null=True,
                verbose_name="Notes",
            ),
        ),
        migrations.AlterField(
            model_name="projecttype",
            name="organization",
            field=models.ForeignKey(
                help_text="Tenant this belongs to",
                on_delete=django.db.models.deletion.CASCADE,
                related_name="+",
                to="access.tenant",
                validators=[
                    access.models.tenancy_abstract.TenancyAbstractModel.validatate_organization_exists
                ],
                verbose_name="Tenant",
            ),
        ),
        migrations.CreateModel(
            name="ProjectAuditHistory",
            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="project_management.project",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Project History",
                "verbose_name_plural": "Project Histories",
                "db_table": "project_management_project_audithistory",
                "managed": True,
            },
            bases=("core.centurionaudit",),
        ),
        migrations.CreateModel(
            name="ProjectCenturionModelNote",
            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="project_management.project",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Project Note",
                "verbose_name_plural": "Project Notes",
                "db_table": "project_management_project_centurionmodelnote",
                "managed": True,
            },
            bases=("core.centurionmodelnote",),
        ),
        migrations.CreateModel(
            name="ProjectMilestoneAuditHistory",
            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="project_management.projectmilestone",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Project Milestone History",
                "verbose_name_plural": "Project Milestone Histories",
                "db_table": "project_management_projectmilestone_audithistory",
                "managed": True,
            },
            bases=("core.centurionaudit",),
        ),
        migrations.CreateModel(
            name="ProjectMilestoneCenturionModelNote",
            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="project_management.projectmilestone",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Project Milestone Note",
                "verbose_name_plural": "Project Milestone Notes",
                "db_table": "project_management_projectmilestone_centurionmodelnote",
                "managed": True,
            },
            bases=("core.centurionmodelnote",),
        ),
        migrations.CreateModel(
            name="ProjectStateAuditHistory",
            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="project_management.projectstate",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Project State History",
                "verbose_name_plural": "Project State Histories",
                "db_table": "project_management_projectstate_audithistory",
                "managed": True,
            },
            bases=("core.centurionaudit",),
        ),
        migrations.CreateModel(
            name="ProjectStateCenturionModelNote",
            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="project_management.projectstate",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Project State Note",
                "verbose_name_plural": "Project State Notes",
                "db_table": "project_management_projectstate_centurionmodelnote",
                "managed": True,
            },
            bases=("core.centurionmodelnote",),
        ),
        migrations.CreateModel(
            name="ProjectTypeAuditHistory",
            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="project_management.projecttype",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Project Type History",
                "verbose_name_plural": "Project Type Histories",
                "db_table": "project_management_projecttype_audithistory",
                "managed": True,
            },
            bases=("core.centurionaudit",),
        ),
        migrations.CreateModel(
            name="ProjectTypeCenturionModelNote",
            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="project_management.projecttype",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Project Type Note",
                "verbose_name_plural": "Project Type Notes",
                "db_table": "project_management_projecttype_centurionmodelnote",
                "managed": True,
            },
            bases=("core.centurionmodelnote",),
        ),
    ]
