From eb06678a24f63532d12e52a7abe29eba7bb3605b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 16 Dec 2022 20:54:42 +0100 Subject: ... --- hosts/surtr/postgresql/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hosts/surtr/postgresql') diff --git a/hosts/surtr/postgresql/default.nix b/hosts/surtr/postgresql/default.nix index 891b6ce0..b9086e73 100644 --- a/hosts/surtr/postgresql/default.nix +++ b/hosts/surtr/postgresql/default.nix @@ -236,6 +236,12 @@ in { CREATE OR REPLACE VIEW virtual_mailbox_access (lookup, action) AS SELECT (CASE WHEN local IS NULL THEN ''' ELSE local END) || (CASE WHEN extension IS NULL THEN ''' ELSE '+' || extension END) || '@' || domain AS lookup, CASE WHEN mailbox IS NULL OR reject THEN 'REJECT' ELSE 'DUNNO' END AS action FROM mailbox_mapping; COMMIT; + + BEGIN; + SELECT _v.register_patch('009-spm-update-mapping', ARRAY['000-base', '002-citext', '003-extensions'], null); + + GRANT UPDATE ON "mailbox_mapping" TO "spm"; + COMMIT; ''} psql etebase postgres -eXf ${pkgs.writeText "etebase.sql" '' -- cgit v1.2.3