aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/migrations
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-21 17:08:24 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-21 17:08:35 +0100
commitecd2c19b265e3974707da0d9b8e260749dcf4a9f (patch)
treea47b8e820e98e39fca7108c1f98bc500bf0c98d9 /ctrack/register/migrations
parent07c741c785761cfa0e9895e35ba7e1f1549ce676 (diff)
renamed a field in a model to date and look what I need! new migrations and fixed tests
Diffstat (limited to 'ctrack/register/migrations')
-rw-r--r--ctrack/register/migrations/0001_initial.py43
-rw-r--r--ctrack/register/migrations/0002_auto_20201021_1551.py (renamed from ctrack/register/migrations/0002_auto_20201014_1605.py)20
-rw-r--r--ctrack/register/migrations/0003_auto_20201015_1955.py19
-rw-r--r--ctrack/register/migrations/0004_auto_20201017_1958.py33
-rw-r--r--ctrack/register/migrations/0005_auto_20201019_0928.py24
-rw-r--r--ctrack/register/migrations/0006_auto_20201019_1935.py43
6 files changed, 47 insertions, 135 deletions
diff --git a/ctrack/register/migrations/0001_initial.py b/ctrack/register/migrations/0001_initial.py
index 1986518..863c575 100644
--- a/ctrack/register/migrations/0001_initial.py
+++ b/ctrack/register/migrations/0001_initial.py
@@ -1,4 +1,4 @@
-# Generated by Django 3.1.2 on 2020-10-14 16:05
+# Generated by Django 3.1.2 on 2020-10-21 15:51
from django.db import migrations, models
@@ -19,10 +19,10 @@ class Migration(migrations.Migration):
('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)),
+ ('document_link', models.URLField(blank=True, help_text='Use this to link to documents on TiME/Sharepoint or elsewhere.', 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)),
+ ('date', models.DateField(help_text='DD/MM/YY format')),
+ ('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')], help_text='Select the event type', max_length=50, verbose_name='Type')),
],
),
migrations.CreateModel(
@@ -32,9 +32,9 @@ class Migration(migrations.Migration):
('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)),
+ ('document_link', models.URLField(blank=True, help_text='Use this to link to documents on TiME/Sharepoint or elsewhere.', 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()),
+ ('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)),
],
@@ -64,20 +64,41 @@ class Migration(migrations.Migration):
],
),
migrations.CreateModel(
+ name='NoteEvent',
+ 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='Use this to link to documents on TiME/Sharepoint or elsewhere.', 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)),
+ ('url', models.URLField(blank=True, help_text='If recording an email, please link to it here. Do not paste the text in the comments box.', max_length=400, null=True, verbose_name='URL')),
+ ('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)),
+ ('private', models.BooleanField(default=False, help_text='Private events can only be seen by you. Official records should not be private, but you can use private events to track your own work.')),
+ ('type_descriptor', models.CharField(default='NOTE', max_length=50)),
+ ],
+ options={
+ 'abstract': 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)),
+ ('document_link', models.URLField(blank=True, help_text='Use this to link to documents on TiME/Sharepoint or elsewhere.', 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')),
+ ('location', models.CharField(blank=True, help_text='If event involved a physical location, indicate here.', max_length=100)),
+ ('url', models.URLField(blank=True, help_text='If recording an email, please link to it here. Do not paste the text in the comments box.', max_length=400, null=True, verbose_name='URL')),
+ ('date', 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')),
+ ('private', models.BooleanField(default=False, help_text='Private events can only be seen by you. Official records should not be private, but you can use private events to track your own work.')),
+ ('type_descriptor', models.CharField(choices=[('MEETING', 'Meeting'), ('PHONE_CALL', 'Phone Call'), ('VIDEO_CALL', 'Video Call'), ('EMAIL', 'Email')], max_length=50, verbose_name='Event Type')),
+ ('participants', models.ManyToManyField(to='organisations.Person')),
],
options={
'abstract': False,
diff --git a/ctrack/register/migrations/0002_auto_20201014_1605.py b/ctrack/register/migrations/0002_auto_20201021_1551.py
index 0d4b440..93c02c8 100644
--- a/ctrack/register/migrations/0002_auto_20201014_1605.py
+++ b/ctrack/register/migrations/0002_auto_20201021_1551.py
@@ -1,4 +1,4 @@
-# Generated by Django 3.1.2 on 2020-10-14 16:05
+# Generated by Django 3.1.2 on 2020-10-21 15:51
import ctrack.register.models
from django.conf import settings
@@ -12,10 +12,10 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ('organisations', '0001_initial'),
- ('caf', '0001_initial'),
+ ('organisations', '0002_auto_20201021_1551'),
('register', '0001_initial'),
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ('caf', '0002_auto_20201021_1551'),
]
operations = [
@@ -25,6 +25,16 @@ class Migration(migrations.Migration):
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
+ model_name='noteevent',
+ name='organisation',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.organisation'),
+ ),
+ migrations.AddField(
+ model_name='noteevent',
+ 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'),
@@ -66,7 +76,7 @@ class Migration(migrations.Migration):
),
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'),
+ constraint=models.CheckConstraint(check=models.Q(_negated=True, end_date__lt=django.db.models.expressions.F('date')), name='register_caftwindateevent_cannot_precede_start_date'),
),
migrations.AddConstraint(
model_name='cafsingledateevent',
diff --git a/ctrack/register/migrations/0003_auto_20201015_1955.py b/ctrack/register/migrations/0003_auto_20201015_1955.py
deleted file mode 100644
index 58d11c1..0000000
--- a/ctrack/register/migrations/0003_auto_20201015_1955.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Generated by Django 3.1.2 on 2020-10-15 19:55
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organisations', '0002_auto_20201015_1955'),
- ('register', '0002_auto_20201014_1605'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='singledatetimeevent',
- name='participants',
- field=models.ManyToManyField(blank=True, to='organisations.Person'),
- ),
- ]
diff --git a/ctrack/register/migrations/0004_auto_20201017_1958.py b/ctrack/register/migrations/0004_auto_20201017_1958.py
deleted file mode 100644
index d13903d..0000000
--- a/ctrack/register/migrations/0004_auto_20201017_1958.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# Generated by Django 3.1.2 on 2020-10-17 19:58
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('register', '0003_auto_20201015_1955'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='singledatetimeevent',
- name='private',
- field=models.BooleanField(default=False, help_text='Private events can only be seen by you. Official records should not be private, but you can use private events to track your own work.'),
- ),
- migrations.AddField(
- model_name='singledatetimeevent',
- name='url',
- field=models.URLField(blank=True, help_text='If recording an email, please link to it here. Do not paste the text in the comments box.', max_length=400, null=True, verbose_name='URL'),
- ),
- migrations.AlterField(
- model_name='singledatetimeevent',
- name='location',
- field=models.CharField(blank=True, help_text='If event involved a physical location, indicate here.', max_length=100),
- ),
- migrations.AlterField(
- model_name='singledatetimeevent',
- name='type_descriptor',
- field=models.CharField(choices=[('MEETING', 'Meeting'), ('PHONE_CALL', 'Phone Call'), ('VIDEO_CALL', 'Video Call'), ('EMAIL', 'Email'), ('NOTE', 'Note')], max_length=50),
- ),
- ]
diff --git a/ctrack/register/migrations/0005_auto_20201019_0928.py b/ctrack/register/migrations/0005_auto_20201019_0928.py
deleted file mode 100644
index ed6f6b5..0000000
--- a/ctrack/register/migrations/0005_auto_20201019_0928.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# Generated by Django 3.1.2 on 2020-10-19 09:28
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organisations', '0002_auto_20201015_1955'),
- ('register', '0004_auto_20201017_1958'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='singledatetimeevent',
- name='participants',
- field=models.ManyToManyField(to='organisations.Person'),
- ),
- migrations.AlterField(
- model_name='singledatetimeevent',
- name='type_descriptor',
- field=models.CharField(choices=[('MEETING', 'Meeting'), ('PHONE_CALL', 'Phone Call'), ('VIDEO_CALL', 'Video Call'), ('EMAIL', 'Email'), ('NOTE', 'Note')], max_length=50, verbose_name='Event Type'),
- ),
- ]
diff --git a/ctrack/register/migrations/0006_auto_20201019_1935.py b/ctrack/register/migrations/0006_auto_20201019_1935.py
deleted file mode 100644
index 291b594..0000000
--- a/ctrack/register/migrations/0006_auto_20201019_1935.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Generated by Django 3.1.2 on 2020-10-19 19:35
-
-from django.conf import settings
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organisations', '0002_auto_20201015_1955'),
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ('register', '0005_auto_20201019_0928'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='singledatetimeevent',
- name='type_descriptor',
- field=models.CharField(choices=[('MEETING', 'Meeting'), ('PHONE_CALL', 'Phone Call'), ('VIDEO_CALL', 'Video Call'), ('EMAIL', 'Email')], max_length=50, verbose_name='Event Type'),
- ),
- migrations.CreateModel(
- name='NoteEvent',
- 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)),
- ('url', models.URLField(blank=True, help_text='If recording an email, please link to it here. Do not paste the text in the comments box.', max_length=400, null=True, verbose_name='URL')),
- ('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)),
- ('private', models.BooleanField(default=False, help_text='Private events can only be seen by you. Official records should not be private, but you can use private events to track your own work.')),
- ('type_descriptor', models.CharField(default='NOTE', max_length=50)),
- ('organisation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.organisation')),
- ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
- ],
- options={
- 'abstract': False,
- },
- ),
- ]