inital commit
This commit is contained in:
77
builder/migrations/0001_initial.py
Normal file
77
builder/migrations/0001_initial.py
Normal file
@@ -0,0 +1,77 @@
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
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="TemplateOption",
|
||||
fields=[
|
||||
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
||||
("name", models.CharField(max_length=120)),
|
||||
("slug", models.SlugField(unique=True)),
|
||||
("description", models.TextField(blank=True)),
|
||||
("supports_basic", models.BooleanField(default=True)),
|
||||
("supports_django", models.BooleanField(default=True)),
|
||||
("source_folder", models.CharField(blank=True, max_length=255)),
|
||||
("is_active", models.BooleanField(default=True)),
|
||||
("created_at", models.DateTimeField(auto_now_add=True)),
|
||||
],
|
||||
options={"ordering": ["name"]},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="ClientSite",
|
||||
fields=[
|
||||
("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||||
("business_name", models.CharField(max_length=160)),
|
||||
("business_address", models.CharField(max_length=255)),
|
||||
("business_phone", models.CharField(max_length=40)),
|
||||
("business_description", models.TextField()),
|
||||
("old_website", models.URLField(blank=True)),
|
||||
(
|
||||
"status",
|
||||
models.CharField(
|
||||
choices=[
|
||||
("draft", "Draft"),
|
||||
("generating", "Generating"),
|
||||
("ready", "Ready"),
|
||||
("failed", "Failed"),
|
||||
],
|
||||
default="draft",
|
||||
max_length=20,
|
||||
),
|
||||
),
|
||||
("ai_payload", models.JSONField(blank=True, default=dict)),
|
||||
("basic_zip_path", models.CharField(blank=True, max_length=255)),
|
||||
("django_zip_path", models.CharField(blank=True, max_length=255)),
|
||||
("last_error", models.TextField(blank=True)),
|
||||
("created_at", models.DateTimeField(auto_now_add=True)),
|
||||
("updated_at", models.DateTimeField(auto_now=True)),
|
||||
(
|
||||
"owner",
|
||||
models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name="client_sites",
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
),
|
||||
),
|
||||
(
|
||||
"template_option",
|
||||
models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.PROTECT,
|
||||
related_name="client_sites",
|
||||
to="builder.templateoption",
|
||||
),
|
||||
),
|
||||
],
|
||||
options={"ordering": ["-created_at"]},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user