1# Generated by Plain 0.52.2 on 2025-07-08 01:17
 2
 3import uuid
 4
 5import plain.postgres.deletion
 6from plain import postgres
 7from plain.postgres import migrations
 8from plain.runtime import settings
 9
10
11class Migration(migrations.Migration):
12    initial = True
13
14    dependencies = [
15        migrations.settings_dependency(settings.AUTH_USER_MODEL),
16    ]
17
18    operations = [
19        migrations.CreateModel(
20            name="SupportFormEntry",
21            fields=[
22                ("id", postgres.PrimaryKeyField()),
23                ("uuid", postgres.UUIDField(default=uuid.uuid4)),
24                ("name", postgres.CharField(max_length=255)),
25                ("email", postgres.EmailField(max_length=254)),
26                ("message", postgres.TextField()),
27                ("created_at", postgres.DateTimeField(auto_now_add=True)),
28                ("form_slug", postgres.CharField(max_length=255)),
29                (
30                    "user",
31                    postgres.ForeignKeyField(
32                        allow_null=True,
33                        on_delete=plain.postgres.deletion.SET_NULL,
34                        required=False,
35                        to=settings.AUTH_USER_MODEL,
36                    ),
37                ),
38            ],
39            options={
40                "ordering": ["-created_at"],
41            },
42        ),
43        migrations.AddIndex(
44            model_name="supportformentry",
45            index=postgres.Index(
46                fields=["created_at"], name="plainsuppor_created_bda60d_idx"
47            ),
48        ),
49        migrations.AddConstraint(
50            model_name="supportformentry",
51            constraint=postgres.UniqueConstraint(
52                fields=("uuid",), name="plainsupport_supportformentry_unique_uuid"
53            ),
54        ),
55    ]