source: trunk/gsdl3/extensions/gsdl-as/create-tables.sql@ 8875

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

first changes towards treating collection ids as unique only on a per-host basis (addressing BTS #11)

  • Property svn:keywords set to Author Date Id Revision
File size: 837 bytes
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);
Note: See TracBrowser for help on using the repository browser.