aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack
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
parent14fa59eee9ba35ad462b5b17229a09164f5d716d (diff)
reset a lot of migrations - all unit tests passing - now has response required fields for simple event
Diffstat (limited to 'ctrack')
-rw-r--r--ctrack/assessments/migrations/0001_initial.py18
-rw-r--r--ctrack/assessments/migrations/0002_auto_20201014_1605.py28
-rw-r--r--ctrack/caf/migrations/0001_initial.py19
-rw-r--r--ctrack/caf/migrations/0002_caf_systems.py18
-rw-r--r--ctrack/register/migrations/0001_initial.py71
-rw-r--r--ctrack/register/migrations/0002_auto_20201014_1605.py75
-rw-r--r--ctrack/register/migrations/0002_engagementevent_user.py23
-rw-r--r--ctrack/register/migrations/0003_auto_20201001_1036.py39
-rw-r--r--ctrack/register/migrations/0004_auto_20201002_1516.py28
-rw-r--r--ctrack/register/migrations/0005_auto_20201002_1536.py18
-rw-r--r--ctrack/register/migrations/0006_engagementtype_single_date_type.py18
-rw-r--r--ctrack/register/migrations/0007_auto_20201013_1250.py84
-rw-r--r--ctrack/register/models.py2
-rw-r--r--ctrack/users/migrations/0001_initial.py8
-rw-r--r--ctrack/users/migrations/0002_auto_20201013_1250.py18
15 files changed, 182 insertions, 285 deletions
diff --git a/ctrack/assessments/migrations/0001_initial.py b/ctrack/assessments/migrations/0001_initial.py
index 3789ad7..a9c6a43 100644
--- a/ctrack/assessments/migrations/0001_initial.py
+++ b/ctrack/assessments/migrations/0001_initial.py
@@ -1,4 +1,4 @@
-# Generated by Django 2.2.12 on 2020-08-27 09:40
+# Generated by Django 3.1.2 on 2020-10-14 16:05
from django.db import migrations, models
import django.db.models.deletion
@@ -9,8 +9,6 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
- ('organisations', '0001_initial'),
- ('caf', '0001_initial'),
]
operations = [
@@ -28,8 +26,6 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('comments', models.TextField(max_length=500)),
- ('caf', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='caf.CAF')),
- ('completer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.Person')),
],
options={
'verbose_name': 'CAF Assessment',
@@ -65,8 +61,8 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('descriptive_text', models.CharField(max_length=2000)),
- ('achievement_level', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assessments.AchievementLevel')),
- ('contributing_outcome', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assessments.CAFContributingOutcome')),
+ ('achievement_level', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assessments.achievementlevel')),
+ ('contributing_outcome', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assessments.cafcontributingoutcome')),
],
options={
'verbose_name': 'IGP',
@@ -80,7 +76,7 @@ class Migration(migrations.Migration):
('title', models.CharField(max_length=50)),
('description', models.TextField(max_length=1000)),
('order_id', models.IntegerField()),
- ('caf_objective', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assessments.CAFObjective')),
+ ('caf_objective', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assessments.cafobjective')),
],
options={
'verbose_name': 'CAF Principle',
@@ -89,7 +85,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='cafcontributingoutcome',
name='principle',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assessments.CAFPrinciple'),
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assessments.cafprinciple'),
),
migrations.CreateModel(
name='CAFAssessmentOutcomeScore',
@@ -97,8 +93,8 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('assessment_score', models.CharField(choices=[('Achieved', 'Achieved'), ('Partially Achieved', 'Partially Achieved'), ('Not Achieved', 'Not Achieved')], help_text='Choose an assessment score', max_length=20, verbose_name='Assessment Score')),
('baseline_assessment_score', models.CharField(choices=[('Achieved', 'Achieved'), ('Partially Achieved', 'Partially Achieved'), ('Not Achieved', 'Not Achieved')], help_text='Choose an assessment score', max_length=20, verbose_name='Baseline Score')),
- ('caf_assessment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assessments.CAFAssessment', verbose_name='CAF Assessment')),
- ('caf_contributing_outcome', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assessments.CAFContributingOutcome', verbose_name='CAF Contributing Outcome')),
+ ('caf_assessment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assessments.cafassessment', verbose_name='CAF Assessment')),
+ ('caf_contributing_outcome', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assessments.cafcontributingoutcome', verbose_name='CAF Contributing Outcome')),
],
options={
'verbose_name': 'CAF Assessment Outcome Score',
diff --git a/ctrack/assessments/migrations/0002_auto_20201014_1605.py b/ctrack/assessments/migrations/0002_auto_20201014_1605.py
new file mode 100644
index 0000000..3a20060
--- /dev/null
+++ b/ctrack/assessments/migrations/0002_auto_20201014_1605.py
@@ -0,0 +1,28 @@
+# Generated by Django 3.1.2 on 2020-10-14 16:05
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ ('caf', '0001_initial'),
+ ('assessments', '0001_initial'),
+ ('organisations', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='cafassessment',
+ name='caf',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='caf.caf'),
+ ),
+ migrations.AddField(
+ model_name='cafassessment',
+ name='completer',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.person'),
+ ),
+ ]
diff --git a/ctrack/caf/migrations/0001_initial.py b/ctrack/caf/migrations/0001_initial.py
index ca65af6..ec2898a 100644
--- a/ctrack/caf/migrations/0001_initial.py
+++ b/ctrack/caf/migrations/0001_initial.py
@@ -1,4 +1,4 @@
-# Generated by Django 2.2.12 on 2020-08-27 09:40
+# Generated by Django 3.1.2 on 2020-10-14 16:05
import ctrack.caf.models
from django.db import migrations, models
@@ -43,7 +43,7 @@ class Migration(migrations.Migration):
('descriptor', models.CharField(max_length=100)),
('virtual_location', models.CharField(help_text='USB, Rosa, email, etc', max_length=100)),
('physical_location', models.CharField(blank=True, help_text='Cupboard, room, building, etc', max_length=100)),
- ('physical_location_organisation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.Organisation')),
+ ('physical_location_organisation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.organisation')),
],
),
migrations.CreateModel(
@@ -52,7 +52,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256)),
('description', models.CharField(max_length=512)),
- ('organisation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.Organisation')),
+ ('organisation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.organisation')),
('systems', models.ManyToManyField(to='caf.ApplicableSystem')),
],
),
@@ -62,7 +62,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('type', models.IntegerField(choices=[(1, 'Excel'), (2, 'Word'), (3, 'PDF'), (4, 'Hard Copy')], default=1)),
- ('file_store_location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='caf.FileStore')),
+ ('file_store_location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='caf.filestore')),
],
),
migrations.CreateModel(
@@ -72,11 +72,12 @@ class Migration(migrations.Migration):
('version', models.CharField(blank=True, max_length=10, null=True)),
('triage_review_date', models.DateField(blank=True, null=True)),
('comments', models.TextField(max_length=1000)),
- ('confidence_grading', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='confidence_grading', to='caf.Grading')),
- ('file', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='caf.DocumentFile')),
- ('organisation', models.ForeignKey(on_delete=models.SET(ctrack.caf.models.CAF.get_sentinel_org), to='organisations.Organisation')),
- ('quality_grading', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='quality_grading', to='caf.Grading')),
- ('triage_review_inspector', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organisations.Person')),
+ ('confidence_grading', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='confidence_grading', to='caf.grading')),
+ ('file', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='caf.documentfile')),
+ ('organisation', models.ForeignKey(on_delete=models.SET(ctrack.caf.models.CAF.get_sentinel_org), to='organisations.organisation')),
+ ('quality_grading', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='quality_grading', to='caf.grading')),
+ ('systems', models.ManyToManyField(to='caf.ApplicableSystem')),
+ ('triage_review_inspector', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organisations.person')),
],
options={
'verbose_name': 'CAF',
diff --git a/ctrack/caf/migrations/0002_caf_systems.py b/ctrack/caf/migrations/0002_caf_systems.py
deleted file mode 100644
index 9e0f76a..0000000
--- a/ctrack/caf/migrations/0002_caf_systems.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.2.12 on 2020-08-27 12:44
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('caf', '0001_initial'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='caf',
- name='systems',
- field=models.ManyToManyField(to='caf.ApplicableSystem'),
- ),
- ]
diff --git a/ctrack/register/migrations/0001_initial.py b/ctrack/register/migrations/0001_initial.py
index 30a69ba..1986518 100644
--- a/ctrack/register/migrations/0001_initial.py
+++ b/ctrack/register/migrations/0001_initial.py
@@ -1,7 +1,6 @@
-# Generated by Django 2.2.12 on 2020-08-27 12:44
+# Generated by Django 3.1.2 on 2020-10-14 16:05
from django.db import migrations, models
-import django.db.models.deletion
class Migration(migrations.Migration):
@@ -10,34 +9,78 @@ class Migration(migrations.Migration):
dependencies = [
('organisations', '0001_initial'),
- ('caf', '0002_caf_systems'),
]
operations = [
migrations.CreateModel(
- name='EngagementType',
+ name='CAFSingleDateEvent',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('descriptor', models.CharField(max_length=50)),
- ('enforcement_instrument', models.BooleanField(default=False)),
- ('regulation_reference', models.CharField(blank=True, max_length=100, null=True)),
- ('comments', models.TextField(blank=True, max_length=1000, null=True)),
+ ('created_date', models.DateTimeField()),
+ ('modified_date', models.DateTimeField()),
+ ('short_description', models.CharField(help_text='Short description of the event. Use Comments field for full detail.', max_length=50)),
+ ('document_link', models.URLField(blank=True, help_text='URL only - do not try to drag a file here.', max_length=1000, null=True)),
+ ('comments', models.TextField(blank=True, help_text='Use this to provide further detail about the event.', max_length=1000, null=True)),
+ ('date', models.DateField()),
+ ('type_descriptor', models.CharField(choices=[('CAF_INITIAL_CAF_RECEIVED', 'CAF - Initial CAF Received'), ('CAF_FEEDBACK_EMAILED_OES', 'CAF - Emailed to OES'), ('CAF_RECEIVED', 'CAF - Received'), ('CAF_EMAILED_ROSA', 'CAF - Emailed to Rosa'), ('CAF_VALIDATION_SIGN_OFF', 'CAF - Validation Sign Off'), ('CAF_VALIDATION_RECORD_EMAILED_TO_OES', 'CAF - Validation Record Sent to OES')], max_length=50)),
+ ],
+ ),
+ migrations.CreateModel(
+ name='CAFTwinDateEvent',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('created_date', models.DateTimeField()),
+ ('modified_date', models.DateTimeField()),
+ ('short_description', models.CharField(help_text='Short description of the event. Use Comments field for full detail.', max_length=50)),
+ ('document_link', models.URLField(blank=True, help_text='URL only - do not try to drag a file here.', max_length=1000, null=True)),
+ ('comments', models.TextField(blank=True, help_text='Use this to provide further detail about the event.', max_length=1000, null=True)),
+ ('start_date', models.DateField()),
+ ('end_date', models.DateField(blank=True, null=True)),
+ ('type_descriptor', models.CharField(choices=[('CAF_PEER_REVIEW_PERIOD', 'CAF - Peer Review Period'), ('CAF_VALIDATION_PERIOD', 'CAF - Validation Period')], max_length=50)),
],
),
migrations.CreateModel(
name='EngagementEvent',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('short_description', models.CharField(help_text='Short description of the event', max_length=50)),
+ ('short_description', models.CharField(help_text='Short description of the event. Use Comments field for full detail.', max_length=50)),
('date', models.DateTimeField()),
- ('end_date', models.DateTimeField(blank=True, null=True)),
- ('document_link', models.URLField(blank=True, max_length=1000, null=True)),
+ ('end_date', models.DateTimeField(blank=True, help_text='Should be used for periodic events.', null=True)),
+ ('document_link', models.URLField(blank=True, help_text='URL only - do not try to drag a file here.', max_length=1000, null=True)),
('response_date_requested', models.DateField(blank=True, null=True)),
('response_received', models.DateField(blank=True, null=True)),
+ ('comments', models.TextField(blank=True, help_text='Use this to provide further detail about the event.', max_length=1000, null=True)),
+ ],
+ ),
+ migrations.CreateModel(
+ name='EngagementType',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('descriptor', models.CharField(max_length=100)),
+ ('enforcement_instrument', models.BooleanField(default=False)),
+ ('regulation_reference', models.CharField(blank=True, max_length=100, null=True)),
('comments', models.TextField(blank=True, max_length=1000, null=True)),
- ('participants', models.ManyToManyField(to='organisations.Person')),
- ('related_caf', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='caf.CAF')),
- ('type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='register.EngagementType')),
+ ('single_date_type', models.BooleanField(default=False)),
+ ],
+ ),
+ migrations.CreateModel(
+ name='SingleDateTimeEvent',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('created_date', models.DateTimeField()),
+ ('modified_date', models.DateTimeField()),
+ ('short_description', models.CharField(help_text='Short description of the event. Use Comments field for full detail.', max_length=50)),
+ ('document_link', models.URLField(blank=True, help_text='URL only - do not try to drag a file here.', max_length=1000, null=True)),
+ ('comments', models.TextField(blank=True, help_text='Use this to provide further detail about the event.', max_length=1000, null=True)),
+ ('location', models.CharField(blank=True, max_length=100)),
+ ('datetime', models.DateTimeField(help_text='DD/MM/YY HH:MM format please!', verbose_name='Date/Time')),
+ ('requested_response_date', models.DateField(blank=True, help_text='DD/MM/YY format', null=True)),
+ ('response_received_date', models.DateField(blank=True, help_text='DD/MM/YY format', null=True)),
+ ('type_descriptor', models.CharField(choices=[('MEETING', 'Meeting'), ('PHONE_CALL', 'Phone Call'), ('VIDEO_CALL', 'Video Call'), ('EMAIL', 'Email')], max_length=50)),
+ ('participants', models.ManyToManyField(blank=True, null=True, to='organisations.Person')),
],
+ options={
+ 'abstract': False,
+ },
),
]
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'),
+ ),
+ ]
diff --git a/ctrack/register/migrations/0002_engagementevent_user.py b/ctrack/register/migrations/0002_engagementevent_user.py
deleted file mode 100644
index 56866dc..0000000
--- a/ctrack/register/migrations/0002_engagementevent_user.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# Generated by Django 2.2.12 on 2020-08-27 12:44
-
-import ctrack.register.models
-from django.conf import settings
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('register', '0001_initial'),
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ]
-
- operations = [
- 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),
- ),
- ]
diff --git a/ctrack/register/migrations/0003_auto_20201001_1036.py b/ctrack/register/migrations/0003_auto_20201001_1036.py
deleted file mode 100644
index 2bf0447..0000000
--- a/ctrack/register/migrations/0003_auto_20201001_1036.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# Generated by Django 2.2.12 on 2020-10-01 10:36
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('register', '0002_engagementevent_user'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='engagementevent',
- name='comments',
- field=models.TextField(blank=True, help_text='Use this to provide further detail about the event.', max_length=1000, null=True),
- ),
- migrations.AlterField(
- model_name='engagementevent',
- name='document_link',
- field=models.URLField(blank=True, help_text='URL only - do not try to drag a file here', max_length=1000, null=True),
- ),
- migrations.AlterField(
- model_name='engagementevent',
- name='participants',
- field=models.ManyToManyField(blank=True, null=True, to='organisations.Person'),
- ),
- migrations.AlterField(
- 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.AlterField(
- model_name='engagementevent',
- name='short_description',
- field=models.CharField(help_text='Short description of the event. Use Comments field for full detail.', max_length=50),
- ),
- ]
diff --git a/ctrack/register/migrations/0004_auto_20201002_1516.py b/ctrack/register/migrations/0004_auto_20201002_1516.py
deleted file mode 100644
index 206cf9b..0000000
--- a/ctrack/register/migrations/0004_auto_20201002_1516.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# Generated by Django 2.2.12 on 2020-10-02 15:16
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('register', '0003_auto_20201001_1036'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='engagementevent',
- name='document_link',
- field=models.URLField(blank=True, help_text='URL only - do not try to drag a file here.', max_length=1000, null=True),
- ),
- migrations.AlterField(
- model_name='engagementevent',
- name='end_date',
- field=models.DateTimeField(blank=True, help_text='Should be used for periodic events.', null=True),
- ),
- migrations.AlterField(
- model_name='engagementtype',
- name='descriptor',
- field=models.CharField(max_length=100),
- ),
- ]
diff --git a/ctrack/register/migrations/0005_auto_20201002_1536.py b/ctrack/register/migrations/0005_auto_20201002_1536.py
deleted file mode 100644
index 2fce0b1..0000000
--- a/ctrack/register/migrations/0005_auto_20201002_1536.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.2.12 on 2020-10-02 15:36
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('register', '0004_auto_20201002_1516'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='engagementevent',
- name='participants',
- field=models.ManyToManyField(blank=True, to='organisations.Person'),
- ),
- ]
diff --git a/ctrack/register/migrations/0006_engagementtype_single_date_type.py b/ctrack/register/migrations/0006_engagementtype_single_date_type.py
deleted file mode 100644
index fdc0d1f..0000000
--- a/ctrack/register/migrations/0006_engagementtype_single_date_type.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.2.12 on 2020-10-02 18:29
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('register', '0005_auto_20201002_1536'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='engagementtype',
- name='single_date_type',
- field=models.BooleanField(default=False),
- ),
- ]
diff --git a/ctrack/register/migrations/0007_auto_20201013_1250.py b/ctrack/register/migrations/0007_auto_20201013_1250.py
deleted file mode 100644
index 9dc4cfb..0000000
--- a/ctrack/register/migrations/0007_auto_20201013_1250.py
+++ /dev/null
@@ -1,84 +0,0 @@
-# Generated by Django 3.1.2 on 2020-10-13 12:50
-
-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):
-
- dependencies = [
- ('caf', '0002_caf_systems'),
- ('organisations', '0001_initial'),
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ('register', '0006_engagementtype_single_date_type'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='CAFMixin',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('related_caf', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='caf.caf')),
- ],
- ),
- migrations.CreateModel(
- name='SingleDateTimeEvent',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('created_date', models.DateTimeField()),
- ('modified_date', models.DateTimeField()),
- ('short_description', models.CharField(help_text='Short description of the event. Use Comments field for full detail.', max_length=50)),
- ('document_link', models.URLField(blank=True, help_text='URL only - do not try to drag a file here.', max_length=1000, null=True)),
- ('comments', models.TextField(blank=True, help_text='Use this to provide further detail about the event.', max_length=1000, null=True)),
- ('location', models.CharField(blank=True, max_length=100)),
- ('datetime', models.DateTimeField()),
- ('type_descriptor', models.CharField(choices=[('MEETING', 'Meeting'), ('PHONE_CALL', 'Phone Call'), ('VIDEO_CALL', 'Video Call')], max_length=50)),
- ('participants', models.ManyToManyField(blank=True, null=True, to='organisations.Person')),
- ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
- ],
- options={
- 'abstract': False,
- },
- ),
- migrations.CreateModel(
- name='CAFTwinDateEvent',
- fields=[
- ('cafmixin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='register.cafmixin')),
- ('created_date', models.DateTimeField()),
- ('modified_date', models.DateTimeField()),
- ('short_description', models.CharField(help_text='Short description of the event. Use Comments field for full detail.', max_length=50)),
- ('document_link', models.URLField(blank=True, help_text='URL only - do not try to drag a file here.', max_length=1000, null=True)),
- ('comments', models.TextField(blank=True, help_text='Use this to provide further detail about the event.', max_length=1000, null=True)),
- ('start_date', models.DateField()),
- ('end_date', models.DateField(blank=True, null=True)),
- ('type_descriptor', models.CharField(choices=[('CAF_PEER_REVIEW_PERIOD', 'CAF - Peer Review Period'), ('CAF_VALIDATION_PERIOD', 'CAF - Validation Period')], max_length=50)),
- ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
- ],
- bases=('register.cafmixin', models.Model),
- ),
- migrations.CreateModel(
- name='CAFSingleDateEvent',
- fields=[
- ('cafmixin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='register.cafmixin')),
- ('created_date', models.DateTimeField()),
- ('modified_date', models.DateTimeField()),
- ('short_description', models.CharField(help_text='Short description of the event. Use Comments field for full detail.', max_length=50)),
- ('document_link', models.URLField(blank=True, help_text='URL only - do not try to drag a file here.', max_length=1000, null=True)),
- ('comments', models.TextField(blank=True, help_text='Use this to provide further detail about the event.', max_length=1000, null=True)),
- ('date', models.DateField()),
- ('type_descriptor', models.CharField(choices=[('CAF_INITIAL_CAF_RECEIVED', 'CAF - Initial CAF Received'), ('CAF_FEEDBACK_EMAILED_OES', 'CAF - Emailed to OES'), ('CAF_RECEIVED', 'CAF - Received'), ('CAF_EMAILED_ROSA', 'CAF - Emailed to Rosa'), ('CAF_VALIDATION_SIGN_OFF', 'CAF - Validation Sign Off'), ('CAF_VALIDATION_RECORD_EMAILED_TO_OES', 'CAF - Validation Record Sent to OES')], max_length=50)),
- ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
- ],
- bases=('register.cafmixin', models.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'),
- ),
- ]
diff --git a/ctrack/register/models.py b/ctrack/register/models.py
index 4687a91..118dfae 100644
--- a/ctrack/register/models.py
+++ b/ctrack/register/models.py
@@ -87,7 +87,7 @@ class EventBase(AuditableEventBase):
class ThirdPartyEventMixin(models.Model):
- participants = models.ManyToManyField(Person, null=True, blank=True)
+ participants = models.ManyToManyField(Person, blank=True)
location = models.CharField(max_length=100, blank=True)
class Meta:
diff --git a/ctrack/users/migrations/0001_initial.py b/ctrack/users/migrations/0001_initial.py
index df3cd12..ec91581 100644
--- a/ctrack/users/migrations/0001_initial.py
+++ b/ctrack/users/migrations/0001_initial.py
@@ -1,4 +1,4 @@
-# Generated by Django 2.2.12 on 2020-08-27 12:44
+# Generated by Django 3.1.2 on 2020-10-14 16:05
import django.contrib.auth.models
import django.contrib.auth.validators
@@ -12,8 +12,8 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
+ ('auth', '0012_alter_user_first_name_max_length'),
('organisations', '0001_initial'),
- ('auth', '0011_update_proxy_permissions'),
]
operations = [
@@ -25,7 +25,7 @@ class Migration(migrations.Migration):
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
- ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
+ ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
@@ -33,7 +33,7 @@ class Migration(migrations.Migration):
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('name', models.CharField(blank=True, max_length=255, verbose_name='Name of User')),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
- ('stakeholder', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organisations.Stakeholder')),
+ ('stakeholder', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organisations.stakeholder')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
],
options={
diff --git a/ctrack/users/migrations/0002_auto_20201013_1250.py b/ctrack/users/migrations/0002_auto_20201013_1250.py
deleted file mode 100644
index 0ce36be..0000000
--- a/ctrack/users/migrations/0002_auto_20201013_1250.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 3.1.2 on 2020-10-13 12:50
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('users', '0001_initial'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='user',
- name='first_name',
- field=models.CharField(blank=True, max_length=150, verbose_name='first name'),
- ),
- ]