dashboard/dash/migrations/0001_initial.py

53 lines
1.6 KiB
Python
Raw Permalink Normal View History

# Generated by Django 4.0.3 on 2022-06-17 14:47
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="InstanceConfiguration",
fields=[
("ID", models.AutoField(primary_key=True, serialize=False)),
(
"name",
models.CharField(
max_length=32,
unique=True,
verbose_name="Name of this configuration",
),
),
(
"ram",
models.FloatField(
verbose_name="The amount of RAM an instance will have"
),
),
(
"cpu",
models.IntegerField(
verbose_name="The amount of CPU an instance will have"
),
),
(
"storage",
models.FloatField(
verbose_name="The amount of storage an instance will have"
),
),
("created_at", models.DateTimeField(auto_now_add=True)),
],
),
migrations.AddConstraint(
model_name="instanceconfiguration",
constraint=models.UniqueConstraint(
fields=("ram", "cpu", "storage"), name="no_repeat_config"
),
),
]