Skip to content

Commit

Permalink
refactor: Move submission_email from teams to team_settings (#3554
Browse files Browse the repository at this point in the history
)
  • Loading branch information
RODO94 authored Aug 23, 2024
1 parent 63a2687 commit 0ce9607
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
30 changes: 18 additions & 12 deletions hasura.planx.uk/metadata/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1768,25 +1768,24 @@
permission:
check: {}
columns:
- id
- boundary_bbox
- boundary_url
- email_reply_to_id
- external_planning_site_name
- external_planning_site_url
- homepage
- help_email
- help_opening_hours
- help_phone
- email_reply_to_id
- team_id
- boundary_bbox
- homepage
- id
- reference_code
- boundary_url
- submission_email
- team_id
comment: ""
select_permissions:
- role: api
permission:
columns:
- id
- team_id
- boundary_bbox
- boundary_url
- email_reply_to_id
Expand All @@ -1796,14 +1795,15 @@
- help_opening_hours
- help_phone
- homepage
- id
- reference_code
- submission_email
- team_id
filter: {}
comment: ""
- role: platformAdmin
permission:
columns:
- id
- team_id
- boundary_bbox
- boundary_url
- email_reply_to_id
Expand All @@ -1813,7 +1813,10 @@
- help_opening_hours
- help_phone
- homepage
- id
- reference_code
- submission_email
- team_id
filter: {}
comment: ""
- role: public
Expand All @@ -1836,8 +1839,6 @@
- role: teamEditor
permission:
columns:
- id
- team_id
- boundary_bbox
- boundary_url
- email_reply_to_id
Expand All @@ -1847,7 +1848,10 @@
- help_opening_hours
- help_phone
- homepage
- id
- reference_code
- submission_email
- team_id
filter: {}
comment: ""
update_permissions:
Expand All @@ -1864,6 +1868,7 @@
- help_phone
- homepage
- reference_code
- submission_email
filter: {}
check: null
comment: ""
Expand All @@ -1880,6 +1885,7 @@
- help_phone
- homepage
- reference_code
- submission_email
filter:
team:
members:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE team_settings
DROP COLUMN submission_email;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
alter table "public"."team_settings" add column "submission_email" text
null;
comment on column "public"."team_settings"."submission_email" is E'Referenced by Send component when configured to email planning office';

UPDATE team_settings
SET submission_email = teams.submission_email
FROM teams
WHERE team_settings.team_id = teams.id;

0 comments on commit 0ce9607

Please sign in to comment.