aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/migrations/0002_auto_20201014_1605.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-14 17:08:54 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-14 17:08:54 +0100
commitbdcc5d9d79f355eac6c2717b0b364b847b9a8115 (patch)
treefded47125bf031632db498a937225c64e841a56c /ctrack/register/migrations/0002_auto_20201014_1605.py
parent14fa59eee9ba35ad462b5b17229a09164f5d716d (diff)
reset a lot of migrations - all unit tests passing - now has response required fields for simple event
Diffstat (limited to 'ctrack/register/migrations/0002_auto_20201014_1605.py')
-rw-r--r--ctrack/register/migrations/0002_auto_20201014_1605.py75
1 files changed, 75 insertions, 0 deletions
diff --git a/ctrack/register/migrations/0002_auto_20201014_1605.py b/ctrack/register/migrations/0002_auto_20201014_1605.py
new file mode 100644
index 0000000..0d4b440
--- /dev/null
+++ b/ctrack/register/migrations/0002_auto_20201014_1605.py
@@ -0,0 +1,75 @@
+# Generated by Django 3.1.2 on 2020-10-14 16:05
+
+import ctrack.register.models
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import django.db.models.expressions
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ('organisations', '0001_initial'),
+ ('caf', '0001_initial'),
+ ('register', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='singledatetimeevent',
+ name='user',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
+ ),
+ migrations.AddField(
+ model_name='engagementevent',
+ name='participants',
+ field=models.ManyToManyField(blank=True, to='organisations.Person'),
+ ),
+ migrations.AddField(
+ model_name='engagementevent',
+ name='related_caf',
+ field=models.ForeignKey(blank=True, help_text='If the event relates to a CAF, refer to it here.', null=True, on_delete=django.db.models.deletion.CASCADE, to='caf.caf'),
+ ),
+ migrations.AddField(
+ model_name='engagementevent',
+ name='type',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='register.engagementtype'),
+ ),
+ migrations.AddField(
+ model_name='engagementevent',
+ name='user',
+ field=models.ForeignKey(on_delete=models.SET(ctrack.register.models.EngagementEvent.get_sentinel_user), to=settings.AUTH_USER_MODEL),
+ ),
+ migrations.AddField(
+ model_name='caftwindateevent',
+ name='related_caf',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='caf.caf'),
+ ),
+ migrations.AddField(
+ model_name='caftwindateevent',
+ name='user',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
+ ),
+ migrations.AddField(
+ model_name='cafsingledateevent',
+ name='related_caf',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='caf.caf'),
+ ),
+ migrations.AddField(
+ model_name='cafsingledateevent',
+ name='user',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
+ ),
+ migrations.AddConstraint(
+ model_name='caftwindateevent',
+ constraint=models.CheckConstraint(check=models.Q(_negated=True, end_date__lt=django.db.models.expressions.F('start_date')), name='register_caftwindateevent_cannot_precede_start_date'),
+ ),
+ migrations.AddConstraint(
+ model_name='cafsingledateevent',
+ constraint=models.UniqueConstraint(condition=models.Q(_negated=True, type_descriptor='CAF_EMAILED_ROSA'), fields=('date', 'type_descriptor'), name='unique_caf_for_date'),
+ ),
+ ]