summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-12-16 20:39:35 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-12-16 20:39:35 +0100
commit3409d4a9128bff673ebb3638ec3dc37ad10a3010 (patch)
tree8f7d8305318e4be2d7e76ffd68d192f619dc6f84
parent2200632b3b29e86f471c018129391cc46b0ecece (diff)
downloadnixos-3409d4a9128bff673ebb3638ec3dc37ad10a3010.tar
nixos-3409d4a9128bff673ebb3638ec3dc37ad10a3010.tar.gz
nixos-3409d4a9128bff673ebb3638ec3dc37ad10a3010.tar.bz2
nixos-3409d4a9128bff673ebb3638ec3dc37ad10a3010.tar.xz
nixos-3409d4a9128bff673ebb3638ec3dc37ad10a3010.zip
...
-rw-r--r--hosts/surtr/postgresql/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/hosts/surtr/postgresql/default.nix b/hosts/surtr/postgresql/default.nix
index 5969ee18..019ed3a5 100644
--- a/hosts/surtr/postgresql/default.nix
+++ b/hosts/surtr/postgresql/default.nix
@@ -227,10 +227,10 @@ in {
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 ALTER TABLE mailbox_mapping DROP CONSTRAINT 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 mailbox_mapping (local, domain) WHERE extension IS null;
231 ALTER TABLE mailbox_mapping ADD CONSTRAINT local_domain_unique USING INDEX local_domain_unique; 231 ALTER TABLE mailbox_mapping ADD CONSTRAINT local_domain_unique USING INDEX local_domain_unique;
232 232
233 CREATE UNIQUE INDEX local_extension_domain_unique ON (local, extension, domain); 233 CREATE UNIQUE INDEX local_extension_domain_unique ON mailbox_mapping (local, extension, domain);
234 ALTER TABLE mailbox_mapping ADD CONSTRAINT local_extension_domain_unique USING INDEX local_extension_domain_unique; 234 ALTER TABLE mailbox_mapping ADD CONSTRAINT local_extension_domain_unique USING INDEX local_extension_domain_unique;
235 235
236 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;