# Generated by Django 2.0 on 2019-09-23 17:47

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name="Group",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("name", models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name="Occupation",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("name", models.CharField(max_length=200)),
                ("boolean", models.NullBooleanField()),
                (
                    "boolean_with_choices",
                    models.NullBooleanField(choices=[(True, "Yes"), (False, "No")]),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Person",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("first_name", models.CharField(max_length=200)),
                ("last_name", models.CharField(max_length=200, verbose_name="surname")),
                (
                    "trans_test",
                    models.CharField(blank=True, max_length=200, verbose_name="translation test"),
                ),
                (
                    "trans_test_lazy",
                    models.CharField(
                        blank=True, max_length=200, verbose_name="translation test lazy"
                    ),
                ),
                ("safe", models.CharField(blank=True, max_length=200, verbose_name="<b>Safe</b>")),
                ("website", models.URLField(blank=True, null=True, verbose_name="web site")),
                ("birthdate", models.DateField(null=True)),
                ("object_id", models.PositiveIntegerField(blank=True, null=True)),
                (
                    "content_type",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="contenttypes.ContentType",
                    ),
                ),
                ("friends", models.ManyToManyField(to="app.Person")),
                (
                    "occupation",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="people",
                        to="app.Occupation",
                        verbose_name="occupation of the person",
                    ),
                ),
            ],
            options={"verbose_name": "person", "verbose_name_plural": "people"},
        ),
        migrations.CreateModel(
            name="PersonInformation",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                (
                    "person",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="info_list",
                        to="app.Person",
                        verbose_name="Information",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Region",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("name", models.CharField(max_length=200)),
                (
                    "mayor",
                    models.OneToOneField(
                        null=True, on_delete=django.db.models.deletion.CASCADE, to="app.Person"
                    ),
                ),
            ],
            options={"ordering": ["name"]},
        ),
        migrations.AddField(
            model_name="occupation",
            name="region",
            field=models.ForeignKey(
                null=True, on_delete=django.db.models.deletion.CASCADE, to="app.Region"
            ),
        ),
        migrations.AddField(
            model_name="group", name="members", field=models.ManyToManyField(to="app.Person")
        ),
        migrations.CreateModel(
            name="PersonProxy",
            fields=[],
            options={"ordering": ("last_name",), "proxy": True, "indexes": []},
            bases=("app.person",),
        ),
    ]
