diff options
Diffstat (limited to 'hosts/surtr/postgresql.nix')
-rw-r--r-- | hosts/surtr/postgresql.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hosts/surtr/postgresql.nix b/hosts/surtr/postgresql.nix index bbe8d01b..28ccd8c4 100644 --- a/hosts/surtr/postgresql.nix +++ b/hosts/surtr/postgresql.nix | |||
@@ -56,6 +56,15 @@ in { | |||
56 | 56 | ||
57 | CREATE VIEW lmtp_mapping ("user", quota_rule, local, domain) AS SELECT mailbox.mailbox AS "user", (CASE WHEN quota_bytes IS NULL THEN '*:ignore' ELSE '*:bytes=' || quota_bytes END) AS quota_rule, local, domain FROM mailbox INNER JOIN mailbox_mapping ON mailbox.id = mailbox_mapping.mailbox; | 57 | CREATE VIEW lmtp_mapping ("user", quota_rule, local, domain) AS SELECT mailbox.mailbox AS "user", (CASE WHEN quota_bytes IS NULL THEN '*:ignore' ELSE '*:bytes=' || quota_bytes END) AS quota_rule, local, domain FROM mailbox INNER JOIN mailbox_mapping ON mailbox.id = mailbox_mapping.mailbox; |
58 | COMMIT; | 58 | COMMIT; |
59 | |||
60 | BEGIN; | ||
61 | SELECT _v.register_patch('002-citext', ARRAY['000-base'], null); | ||
62 | |||
63 | CREATE EXTENSION citext; | ||
64 | ALTER TABLE mailbox ALTER mailbox TYPE citext; | ||
65 | ALTER TABLE mailbox_mapping ALTER local TYPE citext; | ||
66 | ALTER TABLE mailbox_mapping ALTER domain TYPE citext; | ||
67 | COMMIT; | ||
59 | ''} | 68 | ''} |
60 | ''; | 69 | ''; |
61 | }; | 70 | }; |