# Generated by Django 5.1.5 on 2025-04-09 19:29

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


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Address",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("street", models.CharField(max_length=200)),
                ("city", models.CharField(max_length=100)),
                ("country", models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name="AllFieldsModel",
            fields=[
                ("auto_field", models.AutoField(primary_key=True, serialize=False, verbose_name="ID")),
                ("boolean_field", models.BooleanField(default=False, help_text="A true/false value")),
                ("null_boolean_field", models.BooleanField(blank=True, null=True)),
                ("char_field", models.CharField(max_length=255)),
                (
                    "char_field_choices",
                    models.CharField(
                        choices=[("PENDING", "Pending"), ("COMPLETED", "Completed")],
                        default="PENDING",
                        help_text="A choice field",
                        max_length=50,
                        null=True,
                    ),
                ),
                ("text_field", models.TextField(blank=True, verbose_name="Detailed Description")),
                (
                    "slug_field",
                    models.SlugField(allow_unicode=True, help_text="URL-friendly identifier", max_length=100),
                ),
                ("email_field", models.EmailField(max_length=254, unique=True)),
                ("url_field", models.URLField(max_length=300)),
                ("ip_address_field", models.GenericIPAddressField()),
                ("uuid_field", models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
                ("integer_field", models.IntegerField(default=0)),
                ("big_integer_field", models.BigIntegerField(blank=True, null=True)),
                ("small_integer_field", models.SmallIntegerField()),
                ("positive_integer_field", models.PositiveIntegerField()),
                ("positive_small_integer_field", models.PositiveSmallIntegerField()),
                ("positive_big_integer_field", models.PositiveBigIntegerField()),
                ("float_field", models.FloatField(blank=True, null=True)),
                ("decimal_field", models.DecimalField(decimal_places=2, max_digits=10)),
                ("date_field", models.DateField(auto_now_add=True)),
                ("datetime_field", models.DateTimeField(auto_now=True)),
                ("time_field", models.TimeField(blank=True, null=True)),
                ("duration_field", models.DurationField()),
                ("binary_field", models.BinaryField(editable=True)),
                ("file_field", models.FileField(blank=True, upload_to="uploads/%Y/%m/%d/")),
                (
                    "image_field",
                    models.ImageField(
                        blank=True, height_field="image_height", upload_to="images/", width_field="image_width"
                    ),
                ),
                ("image_height", models.PositiveIntegerField(blank=True, editable=False, null=True)),
                ("image_width", models.PositiveIntegerField(blank=True, editable=False, null=True)),
                ("json_field", models.JSONField(blank=True, default=dict, null=True)),
            ],
            options={
                "verbose_name": "Comprehensive Field Model",
                "verbose_name_plural": "Comprehensive Field Models",
                "db_table": "all_fields_comprehensive",
                "ordering": ["-datetime_field", "char_field"],
            },
        ),
        migrations.CreateModel(
            name="ConcreteModel",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=100)),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="Product",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=100)),
                ("price", models.DecimalField(decimal_places=2, max_digits=10)),
                ("description", models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name="Profile",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("bio", models.TextField()),
                ("website", models.URLField()),
            ],
        ),
        migrations.CreateModel(
            name="RelatedModel",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name="Tag",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name="Membership",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("date_joined", models.DateField(auto_now_add=True)),
                (
                    "all_fields_model",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="tests.allfieldsmodel"),
                ),
                (
                    "related_model",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="tests.relatedmodel"),
                ),
            ],
            options={
                "unique_together": {("all_fields_model", "related_model")},
            },
        ),
        migrations.AddField(
            model_name="allfieldsmodel",
            name="foreign_key_field",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="all_fields_models_fk",
                to="tests.relatedmodel",
            ),
        ),
        migrations.AddField(
            model_name="allfieldsmodel",
            name="many_to_many_field",
            field=models.ManyToManyField(
                blank=True, related_name="all_fields_models_m2m", through="tests.Membership", to="tests.relatedmodel"
            ),
        ),
        migrations.AddField(
            model_name="allfieldsmodel",
            name="one_to_one_field",
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="all_fields_model_o2o",
                to="tests.relatedmodel",
            ),
        ),
        migrations.CreateModel(
            name="User",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=100)),
                ("address", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="tests.address")),
                ("profile", models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to="tests.profile")),
                ("tags", models.ManyToManyField(to="tests.tag")),
            ],
        ),
    ]
