Compare commits
3 Commits
d4670a7d02
...
d8b275fe74
Author | SHA1 | Date | |
---|---|---|---|
d8b275fe74 | |||
02080206c6 | |||
66b41e1448 |
56
doorcontrol/migrations/0005_doorcardholdermember_and_more.py
Normal file
56
doorcontrol/migrations/0005_doorcardholdermember_and_more.py
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# 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