photo_dupe
CREATE TABLE photo_dupe ( identifier integer NOT NULL PRIMARY KEY, KEY integer NOT NULL, photo integer NOT NULL REFERENCES photo(identifier), date_of_creation timestamp, -- date when it was inserted in the system storage_location varchar(50), storage_index varchar(10), remark text, -- dupe remark version integer NOT NULL REFERENCES photo_version(identifier) );
Version 2.5
Still in use
= Version 2.5 =
CREATE TABLE photo_dupe ( identifier integer NOT NULL PRIMARY KEY, KEY integer NOT NULL, photo integer NOT NULL REFERENCES photo(identifier), date_of_creation timestamp, -- date when it was inserted in the system storage_location varchar(50), storage_index varchar(10), remark text -- dupe remark );
= Version 2.34 =
-- Add 'version' to photo_dupe to allow individual versions. ALTER TABLE photo_dupe ADD version integer REFERENCES photo_version(identifier); ALTER TABLE photo_dupe ALTER version SET NOT NULL;
== Data change history =
= Version 2.34 =
UPDATE photo_dupe SET version = (SELECT identifier FROM photo_version v WHERE photo_dupe.photo = v.photo AND v.master = 't');