source: trunk/greenstone3-extensions/gsdl-as/create-tables.sql@ 12191

Last change on this file since 12191 was 8888, checked in by schweer, 19 years ago

notifications

  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
Line 
1create table users (
2 username varchar(128) primary key,
3 password text not null
4);
5
6create table subscriptions (
7 id int primary key auto_increment,
8 name varchar(255),
9 email text,
10 rss bool not null default 0,
11 page bool not null default 0,
12 user varchar(128) not null references users.username,
13
14 unique(user,name)
15);
16
17create table predicates (
18 id int primary key auto_increment,
19 field varchar(128) not null,
20 value varchar(255),
21 type enum("org.greenstone.gsdlas.profiles.EqualsPredicate", "org.greenstone.gsdlas.profiles.SubstringMatchPredicate", "org.greenstone.gsdlas.profiles.QueryPredicate") not null,
22
23 unique(field,type,value)
24);
25
26create table subs_to_predicates (
27 subscription int not null references subscriptions.id,
28 predicate int not null references predicates.id,
29
30 unique (subscription,predicate)
31);
32
33create table events (
34 id int primary key auto_increment,
35 timestamp datetime not null,
36 content text not null
37);
38
39create table events_to_subs (
40 event int not null references events.id,
41 subscription int not null references subscriptions.id,
42
43 unique (event,subscription)
44);
Note: See TracBrowser for help on using the repository browser.