31 lines
845 B
Python
31 lines
845 B
Python
|
# Generated by Django 4.0.2 on 2022-03-16 01:54
|
||
|
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
("rentals", "0002_lockerinfo_notes"),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.AddField(
|
||
|
model_name="lockerinfo",
|
||
|
name="reserved",
|
||
|
field=models.BooleanField(
|
||
|
default=False,
|
||
|
help_text="Locker is reserved for MakerSpace use, and cannot be rented.",
|
||
|
),
|
||
|
),
|
||
|
migrations.AddConstraint(
|
||
|
model_name="lockerinfo",
|
||
|
constraint=models.CheckConstraint(
|
||
|
check=models.Q(
|
||
|
("reserved", False), ("renter__isnull", True), _connector="OR"
|
||
|
),
|
||
|
name="locker_not_reserved_and_rented",
|
||
|
),
|
||
|
),
|
||
|
]
|