# Generated by Django 5.1.7 on 2025-04-16 18:05

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
    ]

    operations = [
        migrations.CreateModel(
            name="Author",
            fields=[
                (
                    "order",
                    models.PositiveIntegerField(db_index=True, editable=False, verbose_name="order"),
                ),
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "first_name",
                    models.CharField(max_length=100, verbose_name="Vorname"),
                ),
                ("last_name", models.CharField(max_length=100)),
                ("pseudonym", models.CharField(blank=True, max_length=100, null=True)),
                ("created_dt", models.DateTimeField(auto_now_add=True)),
                ("modified_dt", models.DateTimeField(auto_now=True)),
            ],
            options={
                "verbose_name": "Autor",
                "verbose_name_plural": "Autoren",
                "ordering": ("order",),
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="Bar",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name="Foo",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name="Group",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name="Parent",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                ("name", models.CharField(max_length=100)),
            ],
            options={
                "ordering": ["name"],
            },
        ),
        migrations.CreateModel(
            name="Person",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name="Poly",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                ("shared", models.CharField(max_length=100, null=True)),
                (
                    "polymorphic_ctype",
                    models.ForeignKey(
                        editable=False,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="polymorphic_%(app_label)s.%(class)s_set+",
                        to="contenttypes.contenttype",
                    ),
                ),
            ],
            options={
                "ordering": ["shared"],
            },
        ),
        migrations.CreateModel(
            name="PolyAnswer",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "poly",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="app.poly"),
                ),
                (
                    "polymorphic_ctype",
                    models.ForeignKey(
                        editable=False,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="polymorphic_%(app_label)s.%(class)s_set+",
                        to="contenttypes.contenttype",
                    ),
                ),
            ],
            options={
                "abstract": False,
                "base_manager_name": "objects",
            },
        ),
        migrations.CreateModel(
            name="PolyTwoChoice",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "order",
                    models.PositiveIntegerField(db_index=True, editable=False, verbose_name="order"),
                ),
                ("choice", models.CharField(max_length=100)),
            ],
            options={
                "ordering": ("order",),
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="Baz",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100)),
                (
                    "bar",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="app.bar"),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Book",
            fields=[
                (
                    "order",
                    models.PositiveIntegerField(db_index=True, editable=False, verbose_name="order"),
                ),
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                ("title", models.CharField(max_length=100)),
                ("price", models.DecimalField(decimal_places=2, max_digits=10)),
                ("created_dt", models.DateTimeField(auto_now_add=True)),
                ("modified_dt", models.DateTimeField(auto_now=True)),
                (
                    "author",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="app.author"),
                ),
            ],
            options={
                "ordering": ("order",),
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="Detail",
            fields=[
                (
                    "order",
                    models.PositiveIntegerField(db_index=True, editable=False, verbose_name="order"),
                ),
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                ("integer", models.IntegerField(verbose_name="An integer field")),
                ("number", models.FloatField(verbose_name="A float field")),
                ("char", models.CharField(max_length=100, verbose_name="Text field")),
                ("text", models.TextField(verbose_name="Multiline Text")),
                (
                    "boolean",
                    models.BooleanField(default=None, null=True, verbose_name="A boolean value"),
                ),
                (
                    "boolean_two",
                    models.BooleanField(default=None, null=True, verbose_name="Another boolean value"),
                ),
                ("date", models.DateField(verbose_name="A date field")),
                (
                    "date_time",
                    models.DateTimeField(verbose_name="A date field with time"),
                ),
                ("created_dt", models.DateTimeField(auto_now_add=True)),
                ("modified_dt", models.DateTimeField(auto_now=True)),
                (
                    "author",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="app.author",
                        verbose_name="A foreign key field",
                    ),
                ),
                (
                    "foo",
                    models.ManyToManyField(to="app.foo", verbose_name="Foo selected"),
                ),
            ],
            options={
                "ordering": ("order",),
                "abstract": False,
            },
        ),
        migrations.AddField(
            model_name="bar",
            name="foo",
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="app.foo"),
        ),
        migrations.CreateModel(
            name="Membership",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("date_joined", models.DateField()),
                ("invite_reason", models.CharField(max_length=64)),
                (
                    "group",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="app.group"),
                ),
                (
                    "person",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="app.person"),
                ),
            ],
        ),
        migrations.AddField(
            model_name="group",
            name="members",
            field=models.ManyToManyField(related_name="group", through="app.Membership", to="app.person"),
        ),
        migrations.CreateModel(
            name="PolyOne",
            fields=[
                (
                    "poly_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="app.poly",
                    ),
                ),
                ("one", models.CharField(max_length=100)),
            ],
            options={
                "abstract": False,
                "base_manager_name": "objects",
            },
            bases=("app.poly",),
        ),
        migrations.CreateModel(
            name="PolyThree",
            fields=[
                (
                    "poly_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="app.poly",
                    ),
                ),
                ("three", models.CharField(max_length=100)),
            ],
            options={
                "abstract": False,
                "base_manager_name": "objects",
            },
            bases=("app.poly",),
        ),
        migrations.CreateModel(
            name="PolyTwo",
            fields=[
                (
                    "poly_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="app.poly",
                    ),
                ),
                ("two", models.CharField(max_length=100)),
            ],
            options={
                "abstract": False,
                "base_manager_name": "objects",
            },
            bases=("app.poly",),
        ),
        migrations.CreateModel(
            name="PolyAnswerNumber",
            fields=[
                (
                    "polyanswer_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="app.polyanswer",
                    ),
                ),
                ("answer", models.IntegerField(null=True)),
                ("number", models.IntegerField(null=True)),
            ],
            options={
                "abstract": False,
                "base_manager_name": "objects",
            },
            bases=("app.polyanswer",),
        ),
        migrations.CreateModel(
            name="PolyAnswerText",
            fields=[
                (
                    "polyanswer_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="app.polyanswer",
                    ),
                ),
                ("answer", models.CharField(max_length=100, null=True)),
                ("text", models.CharField(max_length=100, null=True)),
            ],
            options={
                "abstract": False,
                "base_manager_name": "objects",
            },
            bases=("app.polyanswer",),
        ),
        migrations.CreateModel(
            name="PolyParent",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("date_joined", models.DateField()),
                (
                    "parent",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="app.parent"),
                ),
                (
                    "poly",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="app.poly"),
                ),
            ],
        ),
        migrations.AddField(
            model_name="parent",
            name="polys",
            field=models.ManyToManyField(related_name="parents", through="app.PolyParent", to="app.poly"),
        ),
        migrations.AddConstraint(
            model_name="membership",
            constraint=models.UniqueConstraint(fields=("person", "group"), name="unique_person_group"),
        ),
        migrations.AddField(
            model_name="polytwochoice",
            name="poly",
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="app.polytwo"),
        ),
        migrations.AddConstraint(
            model_name="polyparent",
            constraint=models.UniqueConstraint(fields=("poly", "parent"), name="unique_poly_parent"),
        ),
    ]
