summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-12-16 20:38:19 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-12-16 20:38:19 +0100
commit2200632b3b29e86f471c018129391cc46b0ecece (patch)
tree5f68d7d96799748a0edce70389e1d22b1ee8644d /hosts
parented70953370cbec992b7d1d2d05e4263ff8cc27ad (diff)
downloadnixos-2200632b3b29e86f471c018129391cc46b0ecece.tar
nixos-2200632b3b29e86f471c018129391cc46b0ecece.tar.gz
nixos-2200632b3b29e86f471c018129391cc46b0ecece.tar.bz2
nixos-2200632b3b29e86f471c018129391cc46b0ecece.tar.xz
nixos-2200632b3b29e86f471c018129391cc46b0ecece.zip
...
Diffstat (limited to 'hosts')
-rw-r--r--hosts/surtr/postgresql/default.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/hosts/surtr/postgresql/default.nix b/hosts/surtr/postgresql/default.nix
index 79b17f5a..5969ee18 100644
--- a/hosts/surtr/postgresql/default.nix
+++ b/hosts/surtr/postgresql/default.nix
@@ -226,10 +226,12 @@ in {
226 ALTER TABLE mailbox_mapping DROP CONSTRAINT mailbox_mapping_extension_check; 226 ALTER TABLE mailbox_mapping DROP CONSTRAINT mailbox_mapping_extension_check;
227 ALTER TABLE mailbox_mapping ADD CONSTRAINT mailbox_mapping_extension_check CHECK (CASE WHEN extension IS NOT NULL THEN extension NOT LIKE '%+%' AND extension <> ''' AND local IS DISTINCT FROM ''' ELSE true END); 227 ALTER TABLE mailbox_mapping ADD CONSTRAINT mailbox_mapping_extension_check CHECK (CASE WHEN extension IS NOT NULL THEN extension NOT LIKE '%+%' AND extension <> ''' AND local IS DISTINCT FROM ''' ELSE true END);
228 228
229 DROP INDEX local_domain_unique; 229 ALTER TABLE mailbox_mapping DROP CONSTRAINT local_domain_unique;
230 CREATE UNIQUE INDEX local_domain_unique ON (local, domain) WHERE extension IS null; 230 CREATE UNIQUE INDEX local_domain_unique ON (local, domain) WHERE extension IS null;
231 ALTER TABLE mailbox_mapping ADD CONSTRAINT local_domain_unique USING INDEX local_domain_unique;
231 232
232 CREATE UNIQUE INDEX local_extension_domain_unique ON (local, extension, domain); 233 CREATE UNIQUE INDEX local_extension_domain_unique ON (local, extension, domain);
234 ALTER TABLE mailbox_mapping ADD CONSTRAINT local_extension_domain_unique USING INDEX local_extension_domain_unique;
233 235
234 ALTER TABLE mailbox_mapping ADD COLUMN reject bool NOT NULL DEFAULT false; 236 ALTER TABLE mailbox_mapping ADD COLUMN reject bool NOT NULL DEFAULT false;
235 237