comparison artifact-database/doc/schema-pg.sql @ 274:92166f7c3842

#50 Added code on database level to recognize the oldest collection item in a collection (-> master artifact). artifacts/trunk@2071 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 07 Jun 2011 17:09:25 +0000
parents 328ef982d768
children 10aa92f2eca0
comparison
equal deleted inserted replaced
273:22a90706d32d 274:92166f7c3842
45 CREATE TABLE collection_items ( 45 CREATE TABLE collection_items (
46 id int PRIMARY KEY NOT NULL, 46 id int PRIMARY KEY NOT NULL,
47 collection_id int NOT NULL REFERENCES collections(id), 47 collection_id int NOT NULL REFERENCES collections(id),
48 artifact_id int NOT NULL REFERENCES artifacts(id), 48 artifact_id int NOT NULL REFERENCES artifacts(id),
49 attribute bytea, 49 attribute bytea,
50 creation timestamp NOT NULL,
50 UNIQUE (collection_id, artifact_id) 51 UNIQUE (collection_id, artifact_id)
51 ); 52 );
52 53
53 CREATE FUNCTION collections_access_update() RETURNS trigger AS 54 CREATE FUNCTION collections_access_update() RETURNS trigger AS
54 $$ 55 $$

http://dive4elements.wald.intevation.org