From 7107d1fc5b3e505aee690b11ab1d45ec28a75071 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 3 Nov 2017 15:16:14 +0100 Subject: [PATCH] Refactored for a schema solution --- dns/schema.pgsql.sql | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/dns/schema.pgsql.sql b/dns/schema.pgsql.sql index 4fed700..703454b 100644 --- a/dns/schema.pgsql.sql +++ b/dns/schema.pgsql.sql @@ -2,9 +2,6 @@ CREATE DATABASE pdns WITH ENCODING 'UTF8' LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8'; CREATE DATABASE pdnsadm WITH ENCODING 'UTF8' LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8'; -CREATE DATABASE pdns_local WITH ENCODING 'UTF8' LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8'; -CREATE DATABASE pdns_public WITH ENCODING 'UTF8' LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8'; - BEGIN WORK; CREATE ROLE dns @@ -24,16 +21,12 @@ GRANT ALL ON DATABASE "pdnsadm" TO pdnsadm; ALTER DATABASE pdnsadm OWNER TO pdnsadm; CREATE USER pdns_local WITH PASSWORD 'Neingeichee(ghahn7ah'; -COMMENT ON ROLE pdns IS 'User for local PowerDNS'; +COMMENT ON ROLE pdns_local IS 'User for local PowerDNS'; GRANT dns TO pdns_local; -GRANT ALL ON DATABASE "pdns_local" TO pdns_local; -ALTER DATABASE pdns_local OWNER TO pdns_local; CREATE USER pdns_public WITH PASSWORD 'ahr7die3gee]s4vahCoh'; -COMMENT ON ROLE pdns IS 'User for public PowerDNS'; +COMMENT ON ROLE pdns_public IS 'User for public PowerDNS'; GRANT dns TO pdns_public; -GRANT ALL ON DATABASE "pdns_public" TO pdns_public; -ALTER DATABASE pdns_public OWNER TO pdns_public; COMMIT; -- 2.39.5