Compare commits
3 Commits
d8b275fe74
...
d4670a7d02
Author | SHA1 | Date | |
---|---|---|---|
d4670a7d02 | |||
747df72725 | |||
6f1a9c0436 |
@ -1,56 +0,0 @@
|
||||
# Generated by Django 5.0.1 on 2024-02-09 16:37
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("doorcontrol", "0004_hidevent_is_red"),
|
||||
("membershipworks", "0014_remove_eventext_details_timestamp"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="DoorCardholderMember",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("cardholder_id", models.IntegerField()),
|
||||
(
|
||||
"door",
|
||||
models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to="doorcontrol.door",
|
||||
),
|
||||
),
|
||||
(
|
||||
"member",
|
||||
models.ForeignKey(
|
||||
db_constraint=False,
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to="membershipworks.member",
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name="doorcardholdermember",
|
||||
constraint=models.UniqueConstraint(
|
||||
fields=("door", "cardholder_id"), name="unique_door_cardholder_id"
|
||||
),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name="doorcardholdermember",
|
||||
constraint=models.UniqueConstraint(
|
||||
fields=("door", "member"), name="unique_door_member"
|
||||
),
|
||||
),
|
||||
]
|
Loading…
Reference in New Issue
Block a user