-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #283 from co-cddo/feature/revert-ucd-36-changes-fo…
…r-removing-history-button Add historical records back
- Loading branch information
Showing
4 changed files
with
247 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
236 changes: 236 additions & 0 deletions
236
request_a_govuk_domain/request/migrations/0021_historicalregistrypublishedperson_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,236 @@ | ||
# Generated by Django 4.2.13 on 2024-09-24 09:27 | ||
|
||
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): | ||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
("request", "0020_remove_historicalregistrantperson_history_user_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="HistoricalRegistryPublishedPerson", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigIntegerField( | ||
auto_created=True, blank=True, db_index=True, verbose_name="ID" | ||
), | ||
), | ||
("name", models.CharField()), | ||
("email_address", models.EmailField(max_length=320)), | ||
( | ||
"phone_number", | ||
phonenumber_field.modelfields.PhoneNumberField( | ||
blank=True, max_length=128, region=None | ||
), | ||
), | ||
("role", models.CharField()), | ||
("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 registry published person", | ||
"verbose_name_plural": "historical registry published persons", | ||
"ordering": ("-history_date", "-history_id"), | ||
"get_latest_by": ("history_date", "history_id"), | ||
}, | ||
bases=(simple_history.models.HistoricalChanges, models.Model), | ||
), | ||
migrations.CreateModel( | ||
name="HistoricalRegistrarPerson", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigIntegerField( | ||
auto_created=True, blank=True, db_index=True, verbose_name="ID" | ||
), | ||
), | ||
("name", models.CharField()), | ||
("email_address", models.EmailField(max_length=320)), | ||
( | ||
"phone_number", | ||
phonenumber_field.modelfields.PhoneNumberField( | ||
blank=True, max_length=128, region=None | ||
), | ||
), | ||
("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, | ||
), | ||
), | ||
( | ||
"registrar", | ||
models.ForeignKey( | ||
blank=True, | ||
db_constraint=False, | ||
null=True, | ||
on_delete=django.db.models.deletion.DO_NOTHING, | ||
related_name="+", | ||
to="request.registrar", | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "historical registrar person", | ||
"verbose_name_plural": "historical registrar persons", | ||
"ordering": ("-history_date", "-history_id"), | ||
"get_latest_by": ("history_date", "history_id"), | ||
}, | ||
bases=(simple_history.models.HistoricalChanges, models.Model), | ||
), | ||
migrations.CreateModel( | ||
name="HistoricalRegistrantPerson", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigIntegerField( | ||
auto_created=True, blank=True, db_index=True, verbose_name="ID" | ||
), | ||
), | ||
("name", models.CharField()), | ||
("email_address", models.EmailField(max_length=320)), | ||
( | ||
"phone_number", | ||
phonenumber_field.modelfields.PhoneNumberField( | ||
blank=True, max_length=128, region=None | ||
), | ||
), | ||
("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 registrant person", | ||
"verbose_name_plural": "historical registrant persons", | ||
"ordering": ("-history_date", "-history_id"), | ||
"get_latest_by": ("history_date", "history_id"), | ||
}, | ||
bases=(simple_history.models.HistoricalChanges, models.Model), | ||
), | ||
migrations.CreateModel( | ||
name="HistoricalRegistrant", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigIntegerField( | ||
auto_created=True, blank=True, db_index=True, verbose_name="ID" | ||
), | ||
), | ||
("name", models.CharField()), | ||
( | ||
"type", | ||
models.CharField( | ||
choices=[ | ||
( | ||
"central_government", | ||
"Central government department or agency", | ||
), | ||
( | ||
"alb", | ||
"Non-departmental body - also known as an arm's length body", | ||
), | ||
("parish_council", "Parish, town or community council"), | ||
( | ||
"local_authority", | ||
"District, borough, city or county council", | ||
), | ||
("fire_service", "Fire service"), | ||
("combined_authority", "Combined or unitary authority"), | ||
("pcc", "Police and crime commissioner"), | ||
("joint_authority", "Joint authority"), | ||
("joint_committee", "Joint committee"), | ||
( | ||
"psb_group", | ||
"Organisation representing a group of public sector bodies", | ||
), | ||
( | ||
"psb_profession", | ||
"Organisation representing a profession across public sector bodies", | ||
), | ||
], | ||
max_length=100, | ||
), | ||
), | ||
("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 registrant", | ||
"verbose_name_plural": "historical registrants", | ||
"ordering": ("-history_date", "-history_id"), | ||
"get_latest_by": ("history_date", "history_id"), | ||
}, | ||
bases=(simple_history.models.HistoricalChanges, models.Model), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters