From d451447a0bc4eb166b555af5adf038e2d5ea02ad Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Thu, 14 Dec 2023 19:47:42 -0700 Subject: [PATCH] Attempt to fix error on init ERROR: syntax error at or near "-" --- scripts/init/00-usaon-vta-schema.sql | 4 ++-- scripts/init/01-support-user.sql | 12 ++++++------ scripts/init/02-pg_stat_statements.sql | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/init/00-usaon-vta-schema.sql b/scripts/init/00-usaon-vta-schema.sql index 3b353f5..c43085b 100644 --- a/scripts/init/00-usaon-vta-schema.sql +++ b/scripts/init/00-usaon-vta-schema.sql @@ -1,2 +1,2 @@ -CREATE SCHEMA usaon-benefit-tool AUTHORIZATION usaon-benefit-tool; -ALTER ROLE usaon-benefit-tool SET search_path TO usaon-benefit-tool; +CREATE SCHEMA "usaon-benefit-tool" AUTHORIZATION "usaon-benefit-tool"; +ALTER ROLE "usaon-benefit-tool" SET "search_path" TO "usaon-benefit-tool"; diff --git a/scripts/init/01-support-user.sql b/scripts/init/01-support-user.sql index 6eb12cf..8c429d6 100644 --- a/scripts/init/01-support-user.sql +++ b/scripts/init/01-support-user.sql @@ -1,7 +1,7 @@ -CREATE USER support; -GRANT USAGE ON SCHEMA usaon-benefit-tool TO support; -GRANT SELECT, UPDATE ON ALL TABLES IN SCHEMA usaon-benefit-tool TO support; -ALTER ROLE support IN DATABASE usaon-benefit-tool SET search_path TO usaon-benefit-tool; +CREATE USER "support"; +GRANT USAGE ON SCHEMA "usaon-benefit-tool" TO "support"; +GRANT SELECT, UPDATE ON ALL TABLES IN SCHEMA "usaon-benefit-tool" TO "support"; +ALTER ROLE "support" IN DATABASE "usaon-benefit-tool" SET "search_path" TO "usaon-benefit-tool"; ALTER DEFAULT PRIVILEGES - IN SCHEMA usaon-benefit-tool - GRANT SELECT, UPDATE ON TABLES TO support; + IN SCHEMA "usaon-benefit-tool" + GRANT SELECT, UPDATE ON TABLES TO "support"; diff --git a/scripts/init/02-pg_stat_statements.sql b/scripts/init/02-pg_stat_statements.sql index d3c6679..51af388 100644 --- a/scripts/init/02-pg_stat_statements.sql +++ b/scripts/init/02-pg_stat_statements.sql @@ -1 +1 @@ -CREATE EXTENSION pg_stat_statements; +CREATE EXTENSION "pg_stat_statements";