Skip to content

Commit

Permalink
Add new migration file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrystinne committed Nov 21, 2024
1 parent 92447ef commit e7a527e
Showing 1 changed file with 80 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Generated by Django 4.1.10 on 2024-11-19 14:06

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),
("project", "0078_delete_archivedproject"),
]

operations = [
migrations.CreateModel(
name="AWSAccessPoint",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=255)),
(
"aws",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="access_points",
to="project.aws",
),
),
],
),
migrations.CreateModel(
name="AWSAccessPointUser",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"access_point",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="linked_users",
to="project.awsaccesspoint",
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="aws_access_point_users",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"unique_together": {("access_point", "user")},
},
),
migrations.AddField(
model_name="awsaccesspoint",
name="users",
field=models.ManyToManyField(
related_name="linked_access_points",
through="project.AWSAccessPointUser",
to=settings.AUTH_USER_MODEL,
),
),
]

0 comments on commit e7a527e

Please sign in to comment.