-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Drop redundant columns from teams
table
#3636
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2047,30 +2047,21 @@ | |
permission: | ||
check: {} | ||
columns: | ||
- boundary | ||
- created_at | ||
- domain | ||
- id | ||
- name | ||
- notify_personalisation | ||
- settings | ||
- slug | ||
- submission_email | ||
- updated_at | ||
select_permissions: | ||
- role: api | ||
permission: | ||
columns: | ||
- boundary | ||
- created_at | ||
- domain | ||
- id | ||
- name | ||
- notify_personalisation | ||
- reference_code | ||
- settings | ||
- slug | ||
- submission_email | ||
- updated_at | ||
computed_fields: | ||
- boundary_bbox | ||
|
@@ -2082,25 +2073,16 @@ | |
- domain | ||
- id | ||
- name | ||
- notify_personalisation | ||
- reference_code | ||
- settings | ||
- slug | ||
- updated_at | ||
computed_fields: | ||
- boundary_bbox | ||
filter: {} | ||
- role: public | ||
permission: | ||
columns: | ||
- boundary | ||
- created_at | ||
- domain | ||
- id | ||
- name | ||
- notify_personalisation | ||
- reference_code | ||
- settings | ||
- slug | ||
- updated_at | ||
computed_fields: | ||
|
@@ -2113,9 +2095,6 @@ | |
- domain | ||
- id | ||
- name | ||
- notify_personalisation | ||
- reference_code | ||
- settings | ||
- slug | ||
- updated_at | ||
computed_fields: | ||
|
@@ -2127,38 +2106,9 @@ | |
columns: | ||
- domain | ||
- name | ||
- notify_personalisation | ||
- settings | ||
- slug | ||
- submission_email | ||
filter: {} | ||
check: null | ||
- table: | ||
name: teams_summary | ||
Comment on lines
-2136
to
-2137
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure where my previous comment went but this is still being incorrectly removed here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry! That was in the submission email PR, but this is the exact same issue. Removing columns and not repointing the View creation. My bad for missing this again There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @DafyddLlyr for this one, if we merge my submission_email PR (#3640), I have already changed the references in the View creation, so this won't be an issue? Could be a nice candidate to re-do this on a clean branch once #3640 is merged and reopen a new PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Otherwise, I would be repeating code across the migrations |
||
schema: public | ||
select_permissions: | ||
- role: platformAdmin | ||
permission: | ||
columns: | ||
- govpay_enabled | ||
- planning_data_enabled | ||
- id | ||
- govnotify_personalisation | ||
- action_colour | ||
- article_4s_enabled | ||
- bops_submission_url | ||
- favicon | ||
- homepage | ||
- link_colour | ||
- logo | ||
- name | ||
- primary_colour | ||
- reference_code | ||
- send_to_email_address | ||
- slug | ||
- subdomain | ||
filter: {} | ||
comment: "" | ||
- table: | ||
name: uniform_applications | ||
schema: public | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
alter table "public"."teams" add column "settings" jsonb; | ||
alter table "public"."teams" alter column "settings" set default '{"externalPlanningSite": {"url": "https://www.planningportal.co.uk/", "name": "Planning Portal"}}'::jsonb; | ||
alter table "public"."teams" alter column "settings" drop not null; | ||
|
||
|
||
alter table "public"."teams" add column "notify_personalisation" jsonb; | ||
alter table "public"."teams" alter column "notify_personalisation" drop not null; | ||
|
||
alter table "public"."teams" add column "reference_code" text; | ||
alter table "public"."teams" alter column "reference_code" drop not null; | ||
comment on column "public"."teams"."reference_code" is E"Team name in three letter short form"; | ||
|
||
|
||
alter table "public"."teams" add column "boundary" jsonb; | ||
alter table "public"."teams" alter column "boundary" set default '{"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[1.9134116, 49.528423], [1.9134116, 61.331151], [1.9134116, 61.331151], [-10.76418, 61.331151], [-10.76418, 49.528423]]]}, "properties": {}}'::jsonb; | ||
alter table "public"."teams" alter column "boundary" drop not null; | ||
comment on column "public"."teams"."boundary" is E"GeoJSON boundary for team provided by planning.data.gov.uk. Simplified boundary_bbox should generally by used where possible. Defaults to UK extent."; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
alter table "public"."teams" drop column "settings" cascade; | ||
|
||
alter table "public"."teams" drop column "boundary" cascade; | ||
|
||
alter table "public"."teams" drop column "notify_personalisation" cascade; | ||
|
||
alter table "public"."teams" drop column "reference_code" cascade; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the computed field
boundary_bbox
is also redundant now right?