3 create table item_types(
12 date timestamp not null default now(),
13 type text not null references item_types(name), -- index
17 create table topic_types(
26 date timestamp not null default now(),
27 type text not null references topic_types(name), -- index
28 parent_id integer references topics(id), -- index
32 create table item_topics (
33 item_id integer references items(id) ON UPDATE CASCADE ON DELETE CASCADE,
34 topic_id integer references topics(id) ON UPDATE CASCADE ON DELETE CASCADE,
35 PRIMARY KEY (item_id, topic_id)
38 -- create inhertited topics and items
40 insert into topic_types values ('webarchive');
41 create table topics_webarchive (
42 uri text not null, -- unique index
43 last_crawled timestamp,
47 -- HyperEstraier support table
48 insert into item_types values ('est');
49 create table item_est (
50 path text, -- unique index
51 uri text not null, -- unique index
57 insert into topic_types values ('pgbits');
58 create table topics_pgbits (
59 issue int not null, -- unique index
63 insert into item_types values ('pgbits');
64 create table items_pgbits (
65 mytitle text not null,