Skip to content

Commit

Permalink
Add migration file
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtitherington committed Oct 29, 2023
1 parent 8a95164 commit 09c9ec5
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions backend/app/migrations/0007_environment.py
Original file line number Diff line number Diff line change
@@ -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")},
},
),
]

0 comments on commit 09c9ec5

Please sign in to comment.