From f098e1965515f232fdd0dc576cc5ca0912b44b4d Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Fri, 17 Nov 2023 12:41:46 +0000 Subject: [PATCH] feat: add `teams.reference_code` to store Planning Data organisation (#2439) --- hasura.planx.uk/metadata/tables.yaml | 16 ++++++++++------ .../down.sql | 1 + .../up.sql | 2 ++ 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 hasura.planx.uk/migrations/1700221802780_alter_table_public_teams_add_column_reference_code/down.sql create mode 100644 hasura.planx.uk/migrations/1700221802780_alter_table_public_teams_add_column_reference_code/up.sql diff --git a/hasura.planx.uk/metadata/tables.yaml b/hasura.planx.uk/metadata/tables.yaml index a3b41c7d04..54dae90087 100644 --- a/hasura.planx.uk/metadata/tables.yaml +++ b/hasura.planx.uk/metadata/tables.yaml @@ -1324,17 +1324,18 @@ - role: api permission: columns: + - boundary + - created_at + - domain - id + - name - notify_personalisation + - reference_code - settings - - theme - - domain - - name - slug - - created_at - - updated_at - - boundary - submission_email + - theme + - updated_at computed_fields: - boundary_bbox filter: {} @@ -1346,6 +1347,7 @@ - id - name - notify_personalisation + - reference_code - settings - slug - theme @@ -1362,6 +1364,7 @@ - id - name - notify_personalisation + - reference_code - settings - slug - theme @@ -1377,6 +1380,7 @@ - id - name - notify_personalisation + - reference_code - settings - slug - theme diff --git a/hasura.planx.uk/migrations/1700221802780_alter_table_public_teams_add_column_reference_code/down.sql b/hasura.planx.uk/migrations/1700221802780_alter_table_public_teams_add_column_reference_code/down.sql new file mode 100644 index 0000000000..873dfe4abc --- /dev/null +++ b/hasura.planx.uk/migrations/1700221802780_alter_table_public_teams_add_column_reference_code/down.sql @@ -0,0 +1 @@ +alter table "public"."teams" drop column "reference_code" cascade; diff --git a/hasura.planx.uk/migrations/1700221802780_alter_table_public_teams_add_column_reference_code/up.sql b/hasura.planx.uk/migrations/1700221802780_alter_table_public_teams_add_column_reference_code/up.sql new file mode 100644 index 0000000000..460e0fdd6c --- /dev/null +++ b/hasura.planx.uk/migrations/1700221802780_alter_table_public_teams_add_column_reference_code/up.sql @@ -0,0 +1,2 @@ +alter table "public"."teams" add column "reference_code" text null; +comment on column "public"."teams"."reference_code" is E'Organisation reference code sourced from planning.data.gov.uk/dataset/local-authority';