diff options
author | Yulqen <246857+yulqen@users.noreply.github.com> | 2024-09-10 15:58:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-10 15:58:55 +0100 |
commit | dcfe6d87098bbe064d2db268f0972865c3d412bf (patch) | |
tree | 2b82df07a5290f80f25e9780596cbce0f128454f /engagements/migrations/0005_engagementstrategy.py | |
parent | 7ddc22b821f405546786977225e7b194a19b2b77 (diff) | |
parent | 15b2dc965bfe2271d73476fcf9ff636c60113908 (diff) |
Merge pull request #106 from defencedigital/postgres-migration
Adds new Engagement Strategy stuff
Diffstat (limited to 'engagements/migrations/0005_engagementstrategy.py')
-rw-r--r-- | engagements/migrations/0005_engagementstrategy.py | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/engagements/migrations/0005_engagementstrategy.py b/engagements/migrations/0005_engagementstrategy.py new file mode 100644 index 0000000..213499d --- /dev/null +++ b/engagements/migrations/0005_engagementstrategy.py @@ -0,0 +1,62 @@ +# Generated by Django 5.0.4 on 2024-09-10 11:24 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("engagements", "0004_regulatorycycle_alter_engagementeffort_effort_type"), + ] + + operations = [ + migrations.CreateModel( + name="EngagementStrategy", + 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=128)), + ("description", models.TextField(max_length=1024)), + ("inspector_sign_off", models.DateField(blank=True, null=True)), + ("management_sign_off", models.DateField(blank=True, null=True)), + ( + "status", + models.CharField( + choices=[ + ("DRAFT", "Draft"), + ("SUBMITTED", "Submitted"), + ("APPROVED", "Approved"), + ("REJECTED", "Rejected"), + ], + default="DRAFT", + max_length=32, + ), + ), + ( + "end_year", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="end_year", + to="engagements.regulatorycycle", + ), + ), + ( + "organisation", + models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="engagements.organisation"), + ), + ( + "start_year", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="start_year", + to="engagements.regulatorycycle", + ), + ), + ], + options={ + "abstract": False, + }, + ), + ] |