Skip to content

Commit

Permalink
Add migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
jimnarey committed Mar 8, 2024
1 parent 4b74220 commit 3265913
Show file tree
Hide file tree
Showing 2 changed files with 257 additions and 36 deletions.
262 changes: 257 additions & 5 deletions request_a_govuk_domain/request/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,65 @@
# Generated by Django 4.2.9 on 2024-02-05 16:08
# Generated by Django 4.2.10 on 2024-03-07 18:55

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import phonenumber_field.modelfields
import simple_history.models


class Migration(migrations.Migration):
initial = True

dependencies = []
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.CreateModel(
name="UserData",
name="Application",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("_reference", models.CharField(blank=True, max_length=6)),
(
"status",
models.CharField(
choices=[
("Approved", "Approved"),
("Rejected", "Rejected"),
("Pending", "Pending"),
],
default="Pending",
max_length=8,
),
),
("domain_name", models.CharField(max_length=253)),
],
),
migrations.CreateModel(
name="Organisation",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField()),
],
),
migrations.CreateModel(
name="Person",
fields=[
(
"id",
Expand All @@ -21,8 +70,211 @@ class Migration(migrations.Migration):
verbose_name="ID",
),
),
("name", models.CharField(max_length=100)),
("email", models.EmailField(max_length=254)),
("name", models.CharField()),
("email_address", models.EmailField(max_length=320)),
("role", models.CharField()),
(
"phone_number",
phonenumber_field.modelfields.PhoneNumberField(
blank=True, max_length=128, region=None
),
),
],
),
migrations.CreateModel(
name="Review",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("registrant_org_exists", models.BooleanField(default=False)),
("registrant_org_exists_notes", models.TextField(max_length=500)),
("registrant_org_eligible", models.BooleanField(default=False)),
("registrant_org_eligible_notes", models.TextField(max_length=500)),
("registrant_person_id_confirmed", models.BooleanField(default=False)),
(
"registrant_person_id_confirmed_notes",
models.TextField(max_length=500),
),
(
"permission_signatory_role_confirmed",
models.BooleanField(default=False),
),
(
"permission_signatory_role_confirmed_notes",
models.TextField(max_length=500),
),
("domain_name_validated", models.BooleanField(default=False)),
("domain_name_validated_notes", models.TextField(max_length=500)),
("gds_exemption_validated", models.BooleanField(null=True)),
("gds_exemption_validated_notes", models.TextField(max_length=500)),
("ministerial_request_validated", models.BooleanField(null=True)),
(
"ministerial_request_validated_notes",
models.TextField(max_length=500),
),
("nac_appeal_validated", models.BooleanField(null=True)),
("nac_appeal_validated_notes", models.TextField(max_length=500)),
],
),
migrations.CreateModel(
name="Registrant",
fields=[
(
"organisation_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="request.organisation",
),
),
(
"type",
models.CharField(
choices=[
(
"Central government department or agency",
"Central Goverment",
),
(
"Non-departmental body - also known as an arm's length body",
"Ndpb",
),
("Fire Service", "Fire Service"),
(
"County, borough, metropolitan or district council",
"Local Authority",
),
("Parish, town or community council", "Parish Council"),
("Neighbourhood or village council", "Village Council"),
("Combined or unitary authority", "Combined Authority"),
("Police and Crime Commissioner", "Pcc"),
("Joint Authority", "Joint Authority"),
("Joint Committee", "Joint Committee"),
("Representing public sector bodies", "Representative"),
("None of the above", "Other"),
],
max_length=100,
),
),
],
bases=("request.organisation",),
),
migrations.CreateModel(
name="Registrar",
fields=[
(
"organisation_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="request.organisation",
),
),
("email_address", models.EmailField(max_length=320)),
],
bases=("request.organisation",),
),
migrations.CreateModel(
name="HistoricalReview",
fields=[
(
"id",
models.BigIntegerField(
auto_created=True, blank=True, db_index=True, verbose_name="ID"
),
),
("registrant_org_exists", models.BooleanField(default=False)),
("registrant_org_exists_notes", models.TextField(max_length=500)),
("registrant_org_eligible", models.BooleanField(default=False)),
("registrant_org_eligible_notes", models.TextField(max_length=500)),
("registrant_person_id_confirmed", models.BooleanField(default=False)),
(
"registrant_person_id_confirmed_notes",
models.TextField(max_length=500),
),
(
"permission_signatory_role_confirmed",
models.BooleanField(default=False),
),
(
"permission_signatory_role_confirmed_notes",
models.TextField(max_length=500),
),
("domain_name_validated", models.BooleanField(default=False)),
("domain_name_validated_notes", models.TextField(max_length=500)),
("gds_exemption_validated", models.BooleanField(null=True)),
("gds_exemption_validated_notes", models.TextField(max_length=500)),
("ministerial_request_validated", models.BooleanField(null=True)),
(
"ministerial_request_validated_notes",
models.TextField(max_length=500),
),
("nac_appeal_validated", models.BooleanField(null=True)),
("nac_appeal_validated_notes", models.TextField(max_length=500)),
("history_id", models.AutoField(primary_key=True, serialize=False)),
("history_date", models.DateTimeField(db_index=True)),
("history_change_reason", models.CharField(max_length=100, null=True)),
(
"history_type",
models.CharField(
choices=[("+", "Created"), ("~", "Changed"), ("-", "Deleted")],
max_length=1,
),
),
(
"history_user",
models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"verbose_name": "historical review",
"verbose_name_plural": "historical reviews",
"ordering": ("-history_date", "-history_id"),
"get_latest_by": ("history_date", "history_id"),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name="CentralGovernmentAttributes",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("domain_purpose", models.CharField()),
(
"application",
models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE,
to="request.application",
),
),
],
options={
"default_related_name": "centralgovt",
},
),
]

This file was deleted.

0 comments on commit 3265913

Please sign in to comment.