summaryrefslogtreecommitdiff
path: root/hosts/surtr/postgresql.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-05-06 00:11:54 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-05-06 00:11:54 +0200
commit78915bb737db0bbbf584b09cd463b816d6c36ab7 (patch)
tree804f1419eac8c01a0707adf8f3a767acad426599 /hosts/surtr/postgresql.nix
parenta8ceaf922695b585aa7cb8ad74b7ec1850f788e0 (diff)
downloadnixos-78915bb737db0bbbf584b09cd463b816d6c36ab7.tar
nixos-78915bb737db0bbbf584b09cd463b816d6c36ab7.tar.gz
nixos-78915bb737db0bbbf584b09cd463b816d6c36ab7.tar.bz2
nixos-78915bb737db0bbbf584b09cd463b816d6c36ab7.tar.xz
nixos-78915bb737db0bbbf584b09cd463b816d6c36ab7.zip
surtr: ...
Diffstat (limited to 'hosts/surtr/postgresql.nix')
-rw-r--r--hosts/surtr/postgresql.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/hosts/surtr/postgresql.nix b/hosts/surtr/postgresql.nix
index 083bc979..abd2cb26 100644
--- a/hosts/surtr/postgresql.nix
+++ b/hosts/surtr/postgresql.nix
@@ -71,7 +71,7 @@ in {
71 ALTER TABLE mailbox_mapping ALTER local TYPE citext; 71 ALTER TABLE mailbox_mapping ALTER local TYPE citext;
72 ALTER TABLE mailbox_mapping ALTER domain TYPE citext; 72 ALTER TABLE mailbox_mapping ALTER domain TYPE citext;
73 73
74 CREATE VIEW mailbox_quote_rule (id, mailbox, quota_rule) AS SELECT id, mailbox, (CASE WHEN quota_bytes IS NULL THEN '*:ignore' ELSE '*:bytes=' || quota_bytes END) AS quota_rule FROM mailbox; 74 CREATE VIEW mailbox_quota_rule (id, mailbox, quota_rule) AS SELECT id, mailbox, (CASE WHEN quota_bytes IS NULL THEN '*:ignore' ELSE '*:bytes=' || quota_bytes END) AS quota_rule FROM mailbox;
75 75
76 CREATE VIEW virtual_mailbox_domain (domain) AS SELECT DISTINCT domain FROM mailbox_mapping; 76 CREATE VIEW virtual_mailbox_domain (domain) AS SELECT DISTINCT domain FROM mailbox_mapping;
77 CREATE VIEW virtual_mailbox_mapping (lookup) AS SELECT (CASE WHEN local IS NULL THEN ''' ELSE local END) || '@' || domain AS lookup FROM mailbox_mapping; 77 CREATE VIEW virtual_mailbox_mapping (lookup) AS SELECT (CASE WHEN local IS NULL THEN ''' ELSE local END) || '@' || domain AS lookup FROM mailbox_mapping;