diff options
author | Matthew Lemon <y@yulqen.org> | 2024-04-23 11:16:38 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-04-23 11:16:38 +0100 |
commit | 0f951dcf029d4af284467543a3afdf5bf6581a20 (patch) | |
tree | a48384210cdc168e3bd3ccff6d6d516eeed9e748 /instruments/migrations | |
parent | 8b084e9fe7a5f3a04c32daf9a24f7f2cf67300f9 (diff) |
switched to Django
Diffstat (limited to 'instruments/migrations')
-rw-r--r-- | instruments/migrations/0001_initial.py | 50 | ||||
-rw-r--r-- | instruments/migrations/0002_subinstrument_short.py | 17 | ||||
-rw-r--r-- | instruments/migrations/__init__.py | 0 |
3 files changed, 67 insertions, 0 deletions
diff --git a/instruments/migrations/0001_initial.py b/instruments/migrations/0001_initial.py new file mode 100644 index 0000000..ef73e3c --- /dev/null +++ b/instruments/migrations/0001_initial.py @@ -0,0 +1,50 @@ +# Generated by Django 4.0.8 on 2022-11-02 09:00 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('engagements', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Instrument', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date_created', models.DateTimeField(auto_now_add=True)), + ('last_modified', models.DateTimeField(auto_now=True)), + ('name', models.CharField(max_length=512)), + ('long_title', models.CharField(blank=True, max_length=1024, null=True)), + ('designator', models.CharField(blank=True, max_length=3, null=True)), + ('link', models.URLField(blank=True, max_length=1024, null=True)), + ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='engagements.organisation')), + ], + options={ + 'verbose_name_plural': 'Instruments', + }, + ), + migrations.CreateModel( + name='SubInstrument', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date_created', models.DateTimeField(auto_now_add=True)), + ('last_modified', models.DateTimeField(auto_now=True)), + ('is_guidance', models.BooleanField(blank=True, default=False, null=True)), + ('itype', models.CharField(choices=[('DSC', 'Defence Security Condition (DSC)'), ('DSYAP', 'Defence Security Assessment Principle (DSyAP)'), ('DSTAIG', "Defence Security Testing And I Don't Know (DSTAIG)")], max_length=6, verbose_name='Instrument Type')), + ('title', models.CharField(max_length=512)), + ('description', models.TextField(blank=True, null=True)), + ('rationale', models.TextField(blank=True, null=True)), + ('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='instruments.instrument', verbose_name='Parent Instrument')), + ('relative', models.ManyToManyField(to='instruments.subinstrument')), + ], + options={ + 'verbose_name_plural': 'Sub Instruments', + }, + ), + ] diff --git a/instruments/migrations/0002_subinstrument_short.py b/instruments/migrations/0002_subinstrument_short.py new file mode 100644 index 0000000..6492158 --- /dev/null +++ b/instruments/migrations/0002_subinstrument_short.py @@ -0,0 +1,17 @@ +# Generated by Django 4.1.8 on 2023-04-21 08:20 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("instruments", "0001_initial"), + ] + + operations = [ + migrations.AddField( + model_name="subinstrument", + name="short", + field=models.CharField(blank=True, max_length=10, null=True), + ), + ] diff --git a/instruments/migrations/__init__.py b/instruments/migrations/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/instruments/migrations/__init__.py |