comparison db/pubsub.sql @ 301:05c875a13a62

categories are now stored in a dedicated table if item contain an atom entry: - database creation/update files include the new table - item data are now stored in a ItemData namedtuple
author Goffi <goffi@goffi.org>
date Wed, 25 Nov 2015 18:33:38 +0100
parents bed30cef11a8
children 98409ef42c94
comparison
equal deleted inserted replaced
300:c5acb4995fde 301:05c875a13a62
71 item_id integer NOT NULL references items ON DELETE CASCADE, 71 item_id integer NOT NULL references items ON DELETE CASCADE,
72 groupname text NOT NULL, 72 groupname text NOT NULL,
73 UNIQUE (item_id,groupname) 73 UNIQUE (item_id,groupname)
74 ); 74 );
75 75
76 CREATE TABLE item_categories (
77 item_categories_id serial PRIMARY KEY,
78 item_id integer NOT NULL references items ON DELETE CASCADE,
79 category text NOT NULL,
80 UNIQUE (item_id,category)
81 );
82
76 CREATE TABLE metadata ( 83 CREATE TABLE metadata (
77 key text PRIMARY KEY, 84 key text PRIMARY KEY,
78 value text 85 value text
79 ); 86 );
80 87