summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-12-16 20:34:28 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-12-16 20:34:28 +0100
commited70953370cbec992b7d1d2d05e4263ff8cc27ad (patch)
tree36eea12170b60d0da25222422657b5d80d95fce8
parent6f49d8632e6ceccb0399764e7da86cc4cba9ab04 (diff)
downloadnixos-ed70953370cbec992b7d1d2d05e4263ff8cc27ad.tar
nixos-ed70953370cbec992b7d1d2d05e4263ff8cc27ad.tar.gz
nixos-ed70953370cbec992b7d1d2d05e4263ff8cc27ad.tar.bz2
nixos-ed70953370cbec992b7d1d2d05e4263ff8cc27ad.tar.xz
nixos-ed70953370cbec992b7d1d2d05e4263ff8cc27ad.zip
...
-rw-r--r--hosts/surtr/postgresql/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/hosts/surtr/postgresql/default.nix b/hosts/surtr/postgresql/default.nix
index 907c652d..79b17f5a 100644
--- a/hosts/surtr/postgresql/default.nix
+++ b/hosts/surtr/postgresql/default.nix
@@ -226,10 +226,10 @@ 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 ALTER TABLE mailbox_mapping DROP CONSTRAINT local_domain_unique; 229 DROP INDEX local_domain_unique;
230 ALTER TABLE mailbox_mapping ADD CONSTRAINT local_domain_unique UNIQUE (local, domain) WHERE extension IS null; 230 CREATE UNIQUE INDEX local_domain_unique ON (local, domain) WHERE extension IS null;
231 231
232 ALTER TABLE mailbox_mapping ADD CONSTRAINT local_extension_domain_unique UNIQUE (local, extension, domain); 232 CREATE UNIQUE INDEX local_extension_domain_unique ON (local, extension, domain);
233 233
234 ALTER TABLE mailbox_mapping ADD COLUMN reject bool NOT NULL DEFAULT false; 234 ALTER TABLE mailbox_mapping ADD COLUMN reject bool NOT NULL DEFAULT false;
235 235