MSRS/events/migrations/0002_auto_20210418_2026.py
2021-04-18 20:58:18 +02:00

27 lines
794 B
Python

# Generated by Django 3.0.8 on 2021-04-18 18:26
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('events', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.AddField(
model_name='eventregistration',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
migrations.AddConstraint(
model_name='eventregistration',
constraint=models.UniqueConstraint(fields=('event', 'user'), name='register_only_once_per_event'),
),
]