From 97225e40b36e584c8b4e850e681c736ebf1d92ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Wed, 29 Nov 2023 18:37:28 +0000 Subject: [PATCH] feat: Add team_integrations table --- hasura.planx.uk/metadata/tables.yaml | 11 +++++++++++ .../down.sql | 1 + .../up.sql | 1 + 3 files changed, 13 insertions(+) create mode 100644 hasura.planx.uk/migrations/1701282718987_create_table_public_team_integrations/down.sql create mode 100644 hasura.planx.uk/migrations/1701282718987_create_table_public_team_integrations/up.sql diff --git a/hasura.planx.uk/metadata/tables.yaml b/hasura.planx.uk/metadata/tables.yaml index 2e6347e32a..0115ecad46 100644 --- a/hasura.planx.uk/metadata/tables.yaml +++ b/hasura.planx.uk/metadata/tables.yaml @@ -1220,6 +1220,17 @@ - locked_at: _is_null: true check: null +- table: + schema: public + name: team_integrations + select_permissions: + - role: api + permission: + columns: + - id + - team_id + - bops_submission_url + filter: {} - table: schema: public name: team_members diff --git a/hasura.planx.uk/migrations/1701282718987_create_table_public_team_integrations/down.sql b/hasura.planx.uk/migrations/1701282718987_create_table_public_team_integrations/down.sql new file mode 100644 index 0000000000..f3ab63ba15 --- /dev/null +++ b/hasura.planx.uk/migrations/1701282718987_create_table_public_team_integrations/down.sql @@ -0,0 +1 @@ +DROP TABLE "public"."team_integrations"; diff --git a/hasura.planx.uk/migrations/1701282718987_create_table_public_team_integrations/up.sql b/hasura.planx.uk/migrations/1701282718987_create_table_public_team_integrations/up.sql new file mode 100644 index 0000000000..069c4ab52c --- /dev/null +++ b/hasura.planx.uk/migrations/1701282718987_create_table_public_team_integrations/up.sql @@ -0,0 +1 @@ +CREATE TABLE "public"."team_integrations" ("id" serial NOT NULL, "team_id" integer NOT NULL, "bops_submission_url" text, PRIMARY KEY ("id") , FOREIGN KEY ("team_id") REFERENCES "public"."teams"("id") ON UPDATE restrict ON DELETE cascade, UNIQUE ("team_id"));COMMENT ON TABLE "public"."team_integrations" IS E'Tracks URLs and API keys for integrations';