Mercurial > libervia-pubsub
comparison db/pubsub.sql @ 295:bed30cef11a8
fixed bad queries in pubsub.sql file
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 20 Aug 2015 14:06:49 +0200 |
parents | df1edebb0466 |
children | 05c875a13a62 |
comparison
equal
deleted
inserted
replaced
294:df1edebb0466 | 295:bed30cef11a8 |
---|---|
14 persist_items boolean, | 14 persist_items boolean, |
15 deliver_payloads boolean NOT NULL DEFAULT TRUE, | 15 deliver_payloads boolean NOT NULL DEFAULT TRUE, |
16 send_last_published_item text NOT NULL DEFAULT 'on_sub' | 16 send_last_published_item text NOT NULL DEFAULT 'on_sub' |
17 CHECK (send_last_published_item IN ('never', 'on_sub')), | 17 CHECK (send_last_published_item IN ('never', 'on_sub')), |
18 publish_model text NOT NULL DEFAULT 'publishers' | 18 publish_model text NOT NULL DEFAULT 'publishers' |
19 CHECK (publish_model IN ('publishers', 'subscribers', 'open')), | 19 CHECK (publish_model IN ('publishers', 'subscribers', 'open')) |
20 UNIQUE (node, pep) WHERE pep IS NOT NULL, | |
21 UNIQUE (node) WHERE pep IS NULL | |
22 ); | 20 ); |
23 | 21 |
24 /* we need 2 partial indexes to manage NULL value for PEP */ | 22 /* we need 2 partial indexes to manage NULL value for PEP */ |
25 CREATE UNIQUE INDEX nodes_node_pep_key_not_null ON nodes(node, pep) WHERE pep IS NOT NULL; | 23 CREATE UNIQUE INDEX nodes_node_pep_key_not_null ON nodes(node, pep) WHERE pep IS NOT NULL; |
26 CREATE UNIQUE INDEX nodes_node_pep_key_null ON nodes(node) WHERE pep IS NULL; | 24 CREATE UNIQUE INDEX nodes_node_pep_key_null ON nodes(node) WHERE pep IS NULL; |