|
1 create table Resource ( |
|
2 resource_id serial primary key, |
|
3 parent_id int references Resource(resource_id), |
|
4 nodename text not null, |
|
5 iscollection boolean not null default false, |
|
6 |
|
7 lastmodified timestamp not null default current_date, |
|
8 creationdate timestamp not null default current_date, |
|
9 contentlength bigint not null default 0, |
|
10 |
|
11 etag uuid, |
|
12 |
|
13 resoid oid, |
|
14 |
|
15 unique(parent_id, nodename) |
|
16 ); |
|
17 |
|
18 create table Property ( |
|
19 property_id serial primary key, |
|
20 resource_id int references Resource(resource_id) on delete cascade, |
|
21 prefix text not null, |
|
22 xmlns text not null, |
|
23 pname text not null, |
|
24 lang text, |
|
25 nsdeflist text, |
|
26 pvalue text, |
|
27 |
|
28 unique(resource_id, xmlns, pname) |
|
29 ); |
|
30 |
|
31 create type property_name as ( |
|
32 xmlns text, |
|
33 name text |
|
34 ); |
|
35 |