comparison flys-artifacts/doc/conf/datacage.sql @ 992:5b467bc27eda

Datacage: Store facets of outs into datacage db at initial scan. flys-artifacts/trunk@2424 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 29 Jul 2011 13:29:29 +0000
parents e573c4715d81
children aabcca7aeb6c
comparison
equal deleted inserted replaced
991:c675b4a87201 992:5b467bc27eda
55 55
56 CREATE SEQUENCE FACETS_ID_SEQ; 56 CREATE SEQUENCE FACETS_ID_SEQ;
57 57
58 CREATE TABLE facets ( 58 CREATE TABLE facets (
59 id INT PRIMARY KEY NOT NULL, 59 id INT PRIMARY KEY NOT NULL,
60 artifact_id INT NOT NULL REFERENCES artifacts(id) ON DELETE CASCADE, 60 out_id INT NOT NULL REFERENCES outs(id) ON DELETE CASCADE,
61 out_id INT NOT NULL REFERENCES outs(id) ON DELETE CASCADE,
62 name VARCHAR(256) NOT NULL, 61 name VARCHAR(256) NOT NULL,
63 num INT NOT NULL, 62 num INT NOT NULL,
64 state VARCHAR(256) NOT NULL, 63 state VARCHAR(256) NOT NULL,
65 description VARCHAR(256), 64 description VARCHAR(256),
66 UNIQUE (artifact_id, out_id, num, name) 65 UNIQUE (artifact_id, out_id, num, name)
67 ); 66 );
68 67
69 -- DROP SEQUENCE USERS_ID_SEQ; 68 -- DROP SEQUENCE USERS_ID_SEQ;

http://dive4elements.wald.intevation.org