-
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.
- Loading branch information
Showing
4 changed files
with
60 additions
and
4 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
30 changes: 30 additions & 0 deletions
30
...k/migrations/1725873202035_alter_table_public_teams_drop_column_submission_email/down.sql
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,30 @@ | ||
alter table "public"."teams" add column "submission_email" text; | ||
comment on column "public"."teams"."submission_email" is E'Referenced by Send component when configured to email planning office'; | ||
|
||
|
||
CREATE OR REPLACE VIEW "public"."teams_summary" AS | ||
SELECT t.id, | ||
t.name, | ||
t.slug, | ||
t.reference_code, | ||
(t.settings ->> 'homepage'::text) AS homepage, | ||
t.domain AS subdomain, | ||
ti.has_planning_data AS planning_data_enabled, | ||
'@todo'::text AS article_4s_enabled, | ||
jsonb_build_object('helpEmail', ts.help_email, 'helpPhone', ts.help_phone, 'emailReplyToId', ts.email_reply_to_id, 'helpOpeningHours', ts.help_opening_hours) AS govnotify_personalisation, | ||
CASE | ||
WHEN (COALESCE(ti.production_govpay_secret, ti.staging_govpay_secret) IS NOT NULL) THEN true | ||
ELSE false | ||
END AS govpay_enabled, | ||
t.submission_email AS send_to_email_address, | ||
COALESCE(ti.production_bops_submission_url, ti.staging_bops_submission_url) AS bops_submission_url, | ||
tt.logo, | ||
tt.favicon, | ||
tt.primary_colour, | ||
tt.link_colour, | ||
tt.action_colour | ||
FROM (((teams t | ||
JOIN team_integrations ti ON ((ti.team_id = t.id))) | ||
JOIN team_themes tt ON ((tt.team_id = t.id))) | ||
JOIN team_settings ts ON ((ts.team_id = t.id))) | ||
ORDER BY t.name; |
30 changes: 30 additions & 0 deletions
30
....uk/migrations/1725873202035_alter_table_public_teams_drop_column_submission_email/up.sql
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,30 @@ | ||
|
||
CREATE OR REPLACE VIEW "public"."teams_summary" AS | ||
SELECT t.id, | ||
t.name, | ||
t.slug, | ||
t.reference_code, | ||
ts.homepage AS homepage, | ||
t.domain AS subdomain, | ||
ti.has_planning_data AS planning_data_enabled, | ||
'@todo'::text AS article_4s_enabled, | ||
jsonb_build_object('helpEmail', ts.help_email, 'helpPhone', ts.help_phone, 'emailReplyToId', ts.email_reply_to_id, 'helpOpeningHours', ts.help_opening_hours) AS govnotify_personalisation, | ||
CASE | ||
WHEN (COALESCE(ti.production_govpay_secret, ti.staging_govpay_secret) IS NOT NULL) THEN true | ||
ELSE false | ||
END AS govpay_enabled, | ||
ts.submission_email AS send_to_email_address, | ||
COALESCE(ti.production_bops_submission_url, ti.staging_bops_submission_url) AS bops_submission_url, | ||
tt.logo, | ||
tt.favicon, | ||
tt.primary_colour, | ||
tt.link_colour, | ||
tt.action_colour | ||
FROM (((teams t | ||
JOIN team_integrations ti ON ((ti.team_id = t.id))) | ||
JOIN team_themes tt ON ((tt.team_id = t.id))) | ||
JOIN team_settings ts ON ((ts.team_id = t.id))) | ||
ORDER BY t.name; | ||
|
||
|
||
alter table "public"."teams" drop column "submission_email" cascade; |
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