comparison 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
comparison
equal deleted inserted replaced
243:42048e37699e 244:3ecc94407e36
51 item_id serial PRIMARY KEY, 51 item_id serial PRIMARY KEY,
52 node_id integer NOT NULL REFERENCES nodes ON DELETE CASCADE, 52 node_id integer NOT NULL REFERENCES nodes ON DELETE CASCADE,
53 item text NOT NULL, 53 item text NOT NULL,
54 publisher text NOT NULL, 54 publisher text NOT NULL,
55 data text, 55 data text,
56 access_model text NOT NULL DEFAULT 'default'
57 CHECK (access_model IN ('default','open', 'roster')),
56 date timestamp with time zone NOT NULL DEFAULT now(), 58 date timestamp with time zone NOT NULL DEFAULT now(),
57 UNIQUE (node_id, item) 59 UNIQUE (node_id, item)
58 ); 60 );
61
62 CREATE TABLE item_groups_authorized (
63 item_groups_authorized_id serial PRIMARY KEY,
64 item_id integer NOT NULL references items ON DELETE CASCADE,
65 groupname text NOT NULL,
66 UNIQUE (item_id,groupname)
67 );
68