From 09c9ec5cd21dec7938439a478fbc1b27fc2f3852 Mon Sep 17 00:00:00 2001 From: tomtitherington Date: Sun, 29 Oct 2023 21:25:05 +0000 Subject: [PATCH] Add migration file --- backend/app/migrations/0007_environment.py | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 backend/app/migrations/0007_environment.py diff --git a/backend/app/migrations/0007_environment.py b/backend/app/migrations/0007_environment.py new file mode 100644 index 0000000..d98cc66 --- /dev/null +++ b/backend/app/migrations/0007_environment.py @@ -0,0 +1,42 @@ +# Generated by Django 4.1.5 on 2023-10-29 21:24 + +from django.db import migrations, models +import django.db.models.deletion +import uuid + + +class Migration(migrations.Migration): + dependencies = [ + ("app", "0006_alter_project_api_key"), + ] + + operations = [ + migrations.CreateModel( + name="Environment", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("name", models.CharField(max_length=100)), + ("identifier", models.CharField(default=uuid.uuid4, max_length=255)), + ("is_default", models.BooleanField(default=False)), + ( + "project", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="environments", + to="app.project", + ), + ), + ], + options={ + "unique_together": {("identifier", "project")}, + }, + ), + ]