aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'ctrack/caf/migrations')
-rw-r--r--ctrack/caf/migrations/0001_initial.py66
-rw-r--r--ctrack/caf/migrations/0002_auto_20200403_1407.py58
-rw-r--r--ctrack/caf/migrations/0003_auto_20200424_1924.py18
-rw-r--r--ctrack/caf/migrations/0004_auto_20200813_0953.py31
-rw-r--r--ctrack/caf/migrations/0005_applicablesystem_oes_categorisation.py18
-rw-r--r--ctrack/caf/migrations/0006_auto_20200813_1125.py22
-rw-r--r--ctrack/caf/migrations/0007_auto_20200814_1230.py23
-rw-r--r--ctrack/caf/migrations/0008_auto_20200814_1318.py23
-rw-r--r--ctrack/caf/migrations/0009_auto_20200826_1255.py30
9 files changed, 44 insertions, 245 deletions
diff --git a/ctrack/caf/migrations/0001_initial.py b/ctrack/caf/migrations/0001_initial.py
index 5e184df..ca65af6 100644
--- a/ctrack/caf/migrations/0001_initial.py
+++ b/ctrack/caf/migrations/0001_initial.py
@@ -1,6 +1,8 @@
-# Generated by Django 2.2.9 on 2020-04-03 14:07
+# Generated by Django 2.2.12 on 2020-08-27 09:40
+import ctrack.caf.models
from django.db import migrations, models
+import django.db.models.deletion
class Migration(migrations.Migration):
@@ -8,6 +10,7 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
+ ('organisations', '0001_initial'),
]
operations = [
@@ -15,49 +18,68 @@ class Migration(migrations.Migration):
name='ApplicableSystem',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=256)),
- ('description', models.TextField(max_length=1000)),
+ ('name', models.CharField(help_text='System name assigned by OES', max_length=256)),
+ ('function', models.TextField(blank=True, help_text='How the system is relevant to delivering or supporting the essential service', max_length=1000, null=True)),
+ ('dft_categorisation', models.CharField(choices=[('CR', 'Critical'), ('IM', 'Important (Legacy use only)')], default='CR', help_text='Refer to documentation for description of these criteria', max_length=2, verbose_name='DfT Categorisation')),
+ ('oes_categorisation', models.CharField(default='NA', help_text="Categorisation based on OES' own internal prioritisation process.", max_length=255, verbose_name='OES Categorisation')),
],
options={
- 'verbose_name': 'Applicable System',
+ 'verbose_name': 'NIS System',
},
),
migrations.CreateModel(
- name='CAF',
+ name='Grading',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('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)),
+ ('descriptor', models.CharField(help_text='Q1, C1, etc', max_length=2)),
+ ('description', models.TextField(max_length=250)),
+ ('type', models.CharField(choices=[('CONFIDENCE', 'Confidence'), ('QUALITY', 'Quality'), ('MISC', 'Misc')], help_text='Type of grading', max_length=20)),
],
- options={
- 'verbose_name': 'CAF',
- },
),
migrations.CreateModel(
- name='DocumentFile',
+ name='FileStore',
fields=[
('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)),
+ ('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')),
],
),
migrations.CreateModel(
- name='FileStore',
+ name='EssentialService',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('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)),
+ ('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')),
+ ('systems', models.ManyToManyField(to='caf.ApplicableSystem')),
],
),
migrations.CreateModel(
- name='Grading',
+ name='DocumentFile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('descriptor', models.CharField(help_text='Q1, C1, etc', max_length=2)),
- ('description', models.TextField(max_length=250)),
- ('type', models.CharField(choices=[('CONFIDENCE', 'Confidence'), ('QUALITY', 'Quality'), ('MISC', 'Misc')], help_text='Type of grading', max_length=20)),
+ ('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')),
],
),
+ migrations.CreateModel(
+ name='CAF',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('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')),
+ ],
+ options={
+ 'verbose_name': 'CAF',
+ },
+ ),
]
diff --git a/ctrack/caf/migrations/0002_auto_20200403_1407.py b/ctrack/caf/migrations/0002_auto_20200403_1407.py
deleted file mode 100644
index e5963d5..0000000
--- a/ctrack/caf/migrations/0002_auto_20200403_1407.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# Generated by Django 2.2.9 on 2020-04-03 14:07
-
-import ctrack.caf.models
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('caf', '0001_initial'),
- ('organisations', '0001_initial'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='filestore',
- name='physical_location_organisation',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.Organisation'),
- ),
- migrations.AddField(
- model_name='documentfile',
- name='file_store_location',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='caf.FileStore'),
- ),
- migrations.AddField(
- model_name='caf',
- name='confidence_grading',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='confidence_grading', to='caf.Grading'),
- ),
- migrations.AddField(
- model_name='caf',
- name='file',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='caf.DocumentFile'),
- ),
- migrations.AddField(
- model_name='caf',
- name='quality_grading',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='quality_grading', to='caf.Grading'),
- ),
- migrations.AddField(
- model_name='caf',
- name='triage_review_inspector',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organisations.Person'),
- ),
- migrations.AddField(
- model_name='applicablesystem',
- name='caf',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='applicable_systems', to='caf.CAF'),
- ),
- migrations.AddField(
- model_name='applicablesystem',
- name='organisation',
- field=models.ForeignKey(on_delete=models.SET(ctrack.caf.models.ApplicableSystem.get_sentinel_org), to='organisations.Organisation'),
- ),
- ]
diff --git a/ctrack/caf/migrations/0003_auto_20200424_1924.py b/ctrack/caf/migrations/0003_auto_20200424_1924.py
deleted file mode 100644
index 34613c6..0000000
--- a/ctrack/caf/migrations/0003_auto_20200424_1924.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.2.9 on 2020-04-24 19:24
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('caf', '0002_auto_20200403_1407'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='applicablesystem',
- name='description',
- field=models.TextField(blank=True, max_length=1000, null=True),
- ),
- ]
diff --git a/ctrack/caf/migrations/0004_auto_20200813_0953.py b/ctrack/caf/migrations/0004_auto_20200813_0953.py
deleted file mode 100644
index ad1ca96..0000000
--- a/ctrack/caf/migrations/0004_auto_20200813_0953.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by Django 2.2.12 on 2020-08-13 09:53
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('caf', '0003_auto_20200424_1924'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='applicablesystem',
- options={'verbose_name': 'NIS System'},
- ),
- migrations.RemoveField(
- model_name='applicablesystem',
- name='description',
- ),
- migrations.AddField(
- model_name='applicablesystem',
- name='function',
- field=models.TextField(blank=True, help_text='How the system is relevant to delivering or supporting the essential service', max_length=1000, null=True),
- ),
- migrations.AlterField(
- model_name='applicablesystem',
- name='name',
- field=models.CharField(help_text='System name assigned by OES', max_length=256),
- ),
- ]
diff --git a/ctrack/caf/migrations/0005_applicablesystem_oes_categorisation.py b/ctrack/caf/migrations/0005_applicablesystem_oes_categorisation.py
deleted file mode 100644
index dc8c928..0000000
--- a/ctrack/caf/migrations/0005_applicablesystem_oes_categorisation.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.2.12 on 2020-08-13 11:17
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('caf', '0004_auto_20200813_0953'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='applicablesystem',
- name='oes_categorisation',
- field=models.CharField(choices=[('CR', 'Critical'), ('IM', 'Important')], default='CR', max_length=2),
- ),
- ]
diff --git a/ctrack/caf/migrations/0006_auto_20200813_1125.py b/ctrack/caf/migrations/0006_auto_20200813_1125.py
deleted file mode 100644
index 1e97dff..0000000
--- a/ctrack/caf/migrations/0006_auto_20200813_1125.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# Generated by Django 2.2.12 on 2020-08-13 11:25
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('caf', '0005_applicablesystem_oes_categorisation'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='applicablesystem',
- name='oes_categorisation',
- ),
- migrations.AddField(
- model_name='applicablesystem',
- name='dft_categorisation',
- field=models.CharField(choices=[('CR', 'Critical'), ('IM', 'Important')], default='CR', help_text='Refer to documentation for description of these criteria', max_length=2, verbose_name='DfT Categorisation'),
- ),
- ]
diff --git a/ctrack/caf/migrations/0007_auto_20200814_1230.py b/ctrack/caf/migrations/0007_auto_20200814_1230.py
deleted file mode 100644
index 68a12bd..0000000
--- a/ctrack/caf/migrations/0007_auto_20200814_1230.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# Generated by Django 2.2.12 on 2020-08-14 12:30
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('caf', '0006_auto_20200813_1125'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='applicablesystem',
- name='oes_categorisation',
- field=models.CharField(default='', help_text="Categorisation based on OES' own internal prioritisation process.", max_length=255, verbose_name='OES Categorisation'),
- ),
- migrations.AlterField(
- model_name='applicablesystem',
- name='dft_categorisation',
- field=models.CharField(choices=[('CR', 'Critical'), ('IM', 'Important (Legacy use only)')], default='CR', help_text='Refer to documentation for description of these criteria', max_length=2, verbose_name='DfT Categorisation'),
- ),
- ]
diff --git a/ctrack/caf/migrations/0008_auto_20200814_1318.py b/ctrack/caf/migrations/0008_auto_20200814_1318.py
deleted file mode 100644
index 90f188f..0000000
--- a/ctrack/caf/migrations/0008_auto_20200814_1318.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# Generated by Django 2.2.12 on 2020-08-14 13:18
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('caf', '0007_auto_20200814_1230'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='applicablesystem',
- name='essential_service',
- field=models.CharField(default='NA', help_text='Name of the essential service which the system suppports.', max_length=255, verbose_name='Essential Service'),
- ),
- migrations.AlterField(
- model_name='applicablesystem',
- name='oes_categorisation',
- field=models.CharField(default='NA', help_text="Categorisation based on OES' own internal prioritisation process.", max_length=255, verbose_name='OES Categorisation'),
- ),
- ]
diff --git a/ctrack/caf/migrations/0009_auto_20200826_1255.py b/ctrack/caf/migrations/0009_auto_20200826_1255.py
deleted file mode 100644
index 6611b59..0000000
--- a/ctrack/caf/migrations/0009_auto_20200826_1255.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# Generated by Django 2.2.12 on 2020-08-26 12:55
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('organisations', '0011_auto_20200531_1441'),
- ('caf', '0008_auto_20200814_1318'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='applicablesystem',
- name='essential_service',
- field=models.CharField(default='NA', help_text='Description of the essential service which the system suppports.', max_length=255, verbose_name='Essential Service'),
- ),
- migrations.CreateModel(
- name='EssentialService',
- fields=[
- ('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')),
- ('systems', models.ManyToManyField(to='caf.ApplicableSystem')),
- ],
- ),
- ]