diff db/pubsub.sql @ 244:3ecc94407e36

item access_model (not finished)
author Goffi <goffi@goffi.org>
date Wed, 30 May 2012 01:04:15 +0200
parents 42048e37699e
children 50f6ee966da8
line wrap: on
line diff
--- a/db/pubsub.sql	Sun May 27 15:55:25 2012 +0200
+++ b/db/pubsub.sql	Wed May 30 01:04:15 2012 +0200
@@ -53,6 +53,16 @@
     item text NOT NULL,
     publisher text NOT NULL,
     data text,
+    access_model text NOT NULL DEFAULT 'default'
+        CHECK (access_model IN ('default','open', 'roster')),
     date timestamp with time zone NOT NULL DEFAULT now(),
     UNIQUE (node_id, item)
 );
+
+CREATE TABLE item_groups_authorized (
+    item_groups_authorized_id serial PRIMARY KEY,
+    item_id integer NOT NULL references items ON DELETE CASCADE,
+    groupname text NOT NULL,
+    UNIQUE (item_id,groupname)
+);
+