# Generated by Django 3.0.7 on 2020-06-26 22:02

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]

    operations = [
        migrations.CreateModel(
            name="CharPk",
            fields=[
                (
                    "custom_pk",
                    models.CharField(max_length=32, primary_key=True, serialize=False),
                )
            ],
        ),
        migrations.CreateModel(
            name="SoftDelete",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("is_active", models.BooleanField(default=True)),
                ("other_field", models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name="TestTrigger",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("field", models.CharField(max_length=16)),
                ("int_field", models.IntegerField(default=0)),
                (
                    "dt_field",
                    models.DateTimeField(default=django.utils.timezone.now),
                ),
                (
                    "nullable",
                    models.CharField(default=None, max_length=16, null=True),
                ),
                (
                    "char_pk_fk_field",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="tests.CharPk",
                    ),
                ),
                (
                    "fk_field",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="TestModel",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("int_field", models.IntegerField(null=True, unique=True)),
                ("char_field", models.CharField(max_length=128, null=True)),
                ("float_field", models.FloatField(null=True)),
            ],
            options={"unique_together": {("int_field", "char_field")}},
        ),
        migrations.CreateModel(
            name="FkToSoftDelete",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "ref",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="tests.SoftDelete",
                    ),
                ),
            ],
        ),
    ]
