CREATE or REPLACE VIEW public.comments AS
SELECT id, domain_id, name, type, modified_at, account, comment
- FROM pdns.comments
+ FROM pdns.comments
WHERE comment IS NULL OR comment !~* '.*public.*';
ALTER TABLE IF EXISTS public.comments OWNER TO pdns_local;
COMMIT;
+-- ----------------
+
+BEGIN WORK;
+
+CREATE or REPLACE VIEW public.domainmetadata AS
+SELECT id, domain_id, kind, content
+ FROM pdns.domainmetadata;
+
+ALTER TABLE IF EXISTS public.domainmetadata OWNER TO pdns_local;
+
+COMMIT;
+
+-- ----------------
+
+BEGIN WORK;
+
+CREATE or REPLACE VIEW public.cryptokeys AS
+SELECT id, domain_id, flags, active, content
+ FROM pdns.cryptokeys;
+
+ALTER TABLE IF EXISTS public.cryptokeys OWNER TO pdns_local;
+
+COMMIT;
+
+-- ----------------
+
+BEGIN WORK;
+
+CREATE or REPLACE VIEW public.tsigkeys AS
+SELECT id, name, algorithm, secret
+ FROM pdns.tsigkeys;
+
+ALTER TABLE IF EXISTS public.tsigkeys OWNER TO pdns_local;
+
+COMMIT;
+
+-- vim: list