diff options
Diffstat (limited to 'ctrack/caf')
-rw-r--r-- | ctrack/caf/migrations/0001_initial.py | 51 | ||||
-rw-r--r-- | ctrack/caf/migrations/0002_auto_20201021_1551.py | 68 |
2 files changed, 87 insertions, 32 deletions
diff --git a/ctrack/caf/migrations/0001_initial.py b/ctrack/caf/migrations/0001_initial.py index ec2898a..c93b0a2 100644 --- a/ctrack/caf/migrations/0001_initial.py +++ b/ctrack/caf/migrations/0001_initial.py @@ -1,8 +1,6 @@ -# 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.caf.models from django.db import migrations, models -import django.db.models.deletion class Migration(migrations.Migration): @@ -10,7 +8,6 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('organisations', '0001_initial'), ] operations = [ @@ -28,22 +25,23 @@ class Migration(migrations.Migration): }, ), migrations.CreateModel( - name='Grading', + name='CAF', 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)), + ('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)), ], + options={ + 'verbose_name': 'CAF', + }, ), migrations.CreateModel( - name='FileStore', + name='DocumentFile', 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)), - ('physical_location_organisation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.organisation')), + ('name', models.CharField(max_length=255)), + ('type', models.IntegerField(choices=[(1, 'Excel'), (2, 'Word'), (3, 'PDF'), (4, 'Hard Copy')], default=1)), ], ), migrations.CreateModel( @@ -52,35 +50,24 @@ 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')), - ('systems', models.ManyToManyField(to='caf.ApplicableSystem')), ], ), 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)), - ('file_store_location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='caf.filestore')), + ('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)), ], ), 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)), - ('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')), + ('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', - }, ), ] diff --git a/ctrack/caf/migrations/0002_auto_20201021_1551.py b/ctrack/caf/migrations/0002_auto_20201021_1551.py new file mode 100644 index 0000000..bb9659e --- /dev/null +++ b/ctrack/caf/migrations/0002_auto_20201021_1551.py @@ -0,0 +1,68 @@ +# Generated by Django 3.1.2 on 2020-10-21 15:51 + +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='essentialservice', + name='organisation', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organisations.organisation'), + ), + migrations.AddField( + model_name='essentialservice', + name='systems', + field=models.ManyToManyField(to='caf.ApplicableSystem'), + ), + 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='organisation', + field=models.ForeignKey(on_delete=models.SET(ctrack.caf.models.CAF.get_sentinel_org), to='organisations.organisation'), + ), + 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='systems', + field=models.ManyToManyField(to='caf.ApplicableSystem'), + ), + 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'), + ), + ] |