forked from Hostea/dashboard
46 lines
1.4 KiB
Python
46 lines
1.4 KiB
Python
|
# Generated by Django 4.0.3 on 2022-06-17 15:47
|
||
|
|
||
|
from django.conf import settings
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||
|
("dash", "0001_initial"),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name="Instance",
|
||
|
fields=[
|
||
|
("ID", models.AutoField(primary_key=True, serialize=False)),
|
||
|
(
|
||
|
"name",
|
||
|
models.CharField(
|
||
|
max_length=32,
|
||
|
unique=True,
|
||
|
verbose_name="Name of this Instance. Also Serves as subdomain",
|
||
|
),
|
||
|
),
|
||
|
("created_at", models.DateTimeField(auto_now_add=True)),
|
||
|
(
|
||
|
"configuration_id",
|
||
|
models.ForeignKey(
|
||
|
on_delete=django.db.models.deletion.PROTECT,
|
||
|
to="dash.instanceconfiguration",
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"owned_by",
|
||
|
models.OneToOneField(
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
to=settings.AUTH_USER_MODEL,
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
]
|