Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/datacage.sql Wed Jul 27 08:20:55 2011 +0000 +++ b/flys-artifacts/doc/conf/datacage.sql Wed Jul 27 11:01:55 2011 +0000 @@ -32,18 +32,27 @@ UNIQUE (artifact_id, k) ); +CREATE TABLE outs ( + id IDENTITY PRIMARY KEY NOT NULL, + artifact_id INT NOT NULL REFERENCES artifacts(id) ON DELETE CASCADE, + name VARCHAR(256) NOT NULL, + description VARCHAR(256), + out_type VARCHAR(256) +); + CREATE TABLE facets ( id IDENTITY PRIMARY KEY NOT NULL, artifact_id INT NOT NULL REFERENCES artifacts(id) ON DELETE CASCADE, + out_id INT NOT NULL REFERENCES outs(id) ON DELETE CASCADE, name VARCHAR(256) NOT NULL, num INT NOT NULL, state VARCHAR(256) NOT NULL, - output VARCHAR(256) NOT NULL, description VARCHAR(256), UNIQUE (artifact_id, output, num, name) ); -- DROP TABLE facets; +-- DROP TABLE outs; -- DROP TABLE artifact_data; -- DROP TABLE collection_items; -- DROP TABLE collections;