Mercurial > dive4elements > river
comparison flys-artifacts/doc/conf/datacage.sql @ 981:799c7108ea6d
datacage: prepared access to outs of artifacts.
flys-artifacts/trunk@2409 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 27 Jul 2011 11:01:55 +0000 |
parents | f9a6a9cd918e |
children | 8094ba4ab873 |
comparison
equal
deleted
inserted
replaced
980:f9a6a9cd918e | 981:799c7108ea6d |
---|---|
30 k VARCHAR(256) NOT NULL, | 30 k VARCHAR(256) NOT NULL, |
31 v VARCHAR(256), -- Maybe too short | 31 v VARCHAR(256), -- Maybe too short |
32 UNIQUE (artifact_id, k) | 32 UNIQUE (artifact_id, k) |
33 ); | 33 ); |
34 | 34 |
35 CREATE TABLE outs ( | |
36 id IDENTITY PRIMARY KEY NOT NULL, | |
37 artifact_id INT NOT NULL REFERENCES artifacts(id) ON DELETE CASCADE, | |
38 name VARCHAR(256) NOT NULL, | |
39 description VARCHAR(256), | |
40 out_type VARCHAR(256) | |
41 ); | |
42 | |
35 CREATE TABLE facets ( | 43 CREATE TABLE facets ( |
36 id IDENTITY PRIMARY KEY NOT NULL, | 44 id IDENTITY PRIMARY KEY NOT NULL, |
37 artifact_id INT NOT NULL REFERENCES artifacts(id) ON DELETE CASCADE, | 45 artifact_id INT NOT NULL REFERENCES artifacts(id) ON DELETE CASCADE, |
46 out_id INT NOT NULL REFERENCES outs(id) ON DELETE CASCADE, | |
38 name VARCHAR(256) NOT NULL, | 47 name VARCHAR(256) NOT NULL, |
39 num INT NOT NULL, | 48 num INT NOT NULL, |
40 state VARCHAR(256) NOT NULL, | 49 state VARCHAR(256) NOT NULL, |
41 output VARCHAR(256) NOT NULL, | |
42 description VARCHAR(256), | 50 description VARCHAR(256), |
43 UNIQUE (artifact_id, output, num, name) | 51 UNIQUE (artifact_id, output, num, name) |
44 ); | 52 ); |
45 | 53 |
46 -- DROP TABLE facets; | 54 -- DROP TABLE facets; |
55 -- DROP TABLE outs; | |
47 -- DROP TABLE artifact_data; | 56 -- DROP TABLE artifact_data; |
48 -- DROP TABLE collection_items; | 57 -- DROP TABLE collection_items; |
49 -- DROP TABLE collections; | 58 -- DROP TABLE collections; |
50 -- DROP TABLE artifacts; | 59 -- DROP TABLE artifacts; |
51 -- DROP TABLE users; | 60 -- DROP TABLE users; |