fix(init): correct quoting of database and user (#6928)

* fix(init): correct quoting

* quote username in logstore migration

---------

Co-authored-by: Silvan <silvan.reusser@gmail.com>
This commit is contained in:
Tim Zook
2023-12-03 02:30:08 -06:00
committed by GitHub
parent e3d1ca4d58
commit 302b4b90d4
16 changed files with 24 additions and 24 deletions

View File

@@ -1,2 +1,2 @@
-- replace %[1]s with the name of the user
CREATE USER IF NOT EXISTS %[1]s
CREATE USER IF NOT EXISTS "%[1]s"

View File

@@ -1,2 +1,2 @@
-- replace %[1]s with the name of the database
CREATE DATABASE IF NOT EXISTS %[1]s
CREATE DATABASE IF NOT EXISTS "%[1]s"

View File

@@ -1,4 +1,4 @@
-- replace the first %[1]s with the database
-- replace the second \%[2]s with the user
GRANT ALL ON DATABASE %[1]s TO %[2]s;
GRANT SYSTEM VIEWACTIVITY TO %[2]s;
GRANT ALL ON DATABASE "%[1]s" TO "%[2]s";
GRANT SYSTEM VIEWACTIVITY TO "%[2]s";

View File

@@ -1,3 +1,3 @@
CREATE SCHEMA IF NOT EXISTS eventstore;
GRANT ALL ON ALL TABLES IN SCHEMA eventstore TO %[1]s;
GRANT ALL ON ALL TABLES IN SCHEMA eventstore TO "%[1]s";

View File

@@ -1,3 +1,3 @@
CREATE SCHEMA IF NOT EXISTS projections;
GRANT ALL ON ALL TABLES IN SCHEMA projections TO %[1]s;
GRANT ALL ON ALL TABLES IN SCHEMA projections TO "%[1]s";

View File

@@ -1,3 +1,3 @@
CREATE SCHEMA IF NOT EXISTS system;
GRANT ALL ON ALL TABLES IN SCHEMA system TO %[1]s;
GRANT ALL ON ALL TABLES IN SCHEMA system TO "%[1]s";

View File

@@ -1 +1 @@
CREATE USER %[1]s
CREATE USER "%[1]s"

View File

@@ -1 +1 @@
CREATE DATABASE %[1]s
CREATE DATABASE "%[1]s"

View File

@@ -1,3 +1,3 @@
-- replace the first %[1]s with the database
-- replace the second \%[2]s with the user
GRANT ALL ON DATABASE %[1]s TO %[2]s;
GRANT ALL ON DATABASE "%[1]s" TO "%[2]s";

View File

@@ -1,3 +1,3 @@
CREATE SCHEMA IF NOT EXISTS eventstore;
GRANT ALL ON ALL TABLES IN SCHEMA eventstore TO %[1]s;
GRANT ALL ON ALL TABLES IN SCHEMA eventstore TO "%[1]s";

View File

@@ -1,3 +1,3 @@
CREATE SCHEMA IF NOT EXISTS projections;
GRANT ALL ON ALL TABLES IN SCHEMA projections TO %[1]s;
GRANT ALL ON ALL TABLES IN SCHEMA projections TO "%[1]s";

View File

@@ -1,3 +1,3 @@
CREATE SCHEMA IF NOT EXISTS system;
GRANT ALL ON ALL TABLES IN SCHEMA system TO %[1]s;
GRANT ALL ON ALL TABLES IN SCHEMA system TO "%[1]s";