# Generated by Django 4.2.21 on 2025-05-27 00:35

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("auth", "0012_alter_user_first_name_max_length"),
        ("authentication", "0024_alter_userprofile_language"),
    ]

    operations = [
        migrations.CreateModel(
            name="General",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
            ],
            options={
                "permissions": (
                    ("basic_access", "Can access this app"),
                    ("editor_access", "Can edit this app"),
                ),
                "managed": False,
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="Log",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("user", models.TextField(blank=True, default="", null=True)),
                ("action", models.TextField(blank=True, default="", null=True)),
                ("details", models.TextField(blank=True, default="", null=True)),
                ("created", models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name="Page",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "title",
                    models.CharField(
                        help_text="Required: Displayed above content and in menu",
                        max_length=255,
                    ),
                ),
                (
                    "slug",
                    models.CharField(
                        help_text="Required: Indentifier for path and links",
                        max_length=255,
                    ),
                ),
                (
                    "priority",
                    models.IntegerField(
                        default=10,
                        help_text="Required: Sort order for pages on the same path",
                    ),
                ),
                ("content", models.TextField(blank=True, default="", null=True)),
                (
                    "groups",
                    models.ManyToManyField(
                        blank=True,
                        default=None,
                        help_text="Optional: Restrict Page to specific Groups",
                        related_name="+",
                        to="auth.group",
                        verbose_name="groups",
                    ),
                ),
                (
                    "parent",
                    models.ForeignKey(
                        blank=True,
                        help_text="Required: Oragnise page hierarchy",
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="children",
                        to="evewiki.page",
                    ),
                ),
                (
                    "states",
                    models.ManyToManyField(
                        blank=True,
                        default=None,
                        help_text="Optional: Restrict Page to specific States",
                        related_name="+",
                        to="authentication.state",
                        verbose_name="states",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Setting",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "hierarchy_max_display_depth",
                    models.IntegerField(
                        default=10,
                        help_text="Limit the depth of the tree for the hierarchy on the main display",
                    ),
                ),
                (
                    "max_versions",
                    models.IntegerField(
                        default=1000,
                        help_text="No one has infinite disk space, a sensible limit which can be modified to clear down the history",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="PageVersion",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("content", models.TextField(blank=True, default="", null=True)),
                ("created", models.DateTimeField(auto_now_add=True)),
                (
                    "page",
                    models.ForeignKey(
                        blank=True,
                        help_text="Page being edited",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="evewiki.page",
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        blank=True,
                        help_text="User editing the page",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="authentication.userprofile",
                    ),
                ),
            ],
        ),
    ]
