comparison flys-artifacts/doc/conf/datacage.sql @ 988:dbe39e1fb5e7

Datacage: Add collection items at initial scan. flys-artifacts/trunk@2420 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 28 Jul 2011 15:59:38 +0000
parents 8094ba4ab873
children e573c4715d81
comparison
equal deleted inserted replaced
987:82ef338fee91 988:dbe39e1fb5e7
22 id INT PRIMARY KEY NOT NULL, 22 id INT PRIMARY KEY NOT NULL,
23 gid UUID NOT NULL UNIQUE, 23 gid UUID NOT NULL UNIQUE,
24 state VARCHAR(256) NOT NULL 24 state VARCHAR(256) NOT NULL
25 ); 25 );
26 26
27 CREATE SEQUENCE COLLECTIONS_ITEMS_ID_SEQ; 27 CREATE SEQUENCE COLLECTION_ITEMS_ID_SEQ;
28 28
29 CREATE TABLE collection_items ( 29 CREATE TABLE collection_items (
30 id INT PRIMARY KEY NOT NULL, 30 id INT PRIMARY KEY NOT NULL,
31 collection_id INT NOT NULL REFERENCES collections(id) ON DELETE CASCADE, 31 collection_id INT NOT NULL REFERENCES collections(id) ON DELETE CASCADE,
32 artifact_id INT NOT NULL REFERENCES artifacts(id) ON DELETE CASCADE 32 artifact_id INT NOT NULL REFERENCES artifacts(id) ON DELETE CASCADE
66 ); 66 );
67 67
68 -- DROP SEQUENCE USERS_ID_SEQ; 68 -- DROP SEQUENCE USERS_ID_SEQ;
69 -- DROP SEQUENCE COLLECTIONS_ID_SEQ; 69 -- DROP SEQUENCE COLLECTIONS_ID_SEQ;
70 -- DROP SEQUENCE ARTIFACTS_ID_SEQ; 70 -- DROP SEQUENCE ARTIFACTS_ID_SEQ;
71 -- DROP SEQUENCE COLLECTIONS_ITEMS_ID_SEQ; 71 -- DROP SEQUENCE COLLECTION_ITEMS_ID_SEQ;
72 -- DROP SEQUENCE ARTIFACT_DATA_ID_SEQ; 72 -- DROP SEQUENCE ARTIFACT_DATA_ID_SEQ;
73 -- DROP SEQUENCE OUTS_ID_SEQ; 73 -- DROP SEQUENCE OUTS_ID_SEQ;
74 -- DROP SEQUENCE FACETS_ID_SEQ; 74 -- DROP SEQUENCE FACETS_ID_SEQ;
75 -- DROP TABLE facets; 75 -- DROP TABLE facets;
76 -- DROP TABLE outs; 76 -- DROP TABLE outs;

http://dive4elements.wald.intevation.org