album_content
This table keeps track of what photos are in which albums.
Unlike folders, it's possible for a photo to be in more than one album. This table allows for that.
CREATE TABLE album_content ( identifier integer NOT NULL PRIMARY KEY, photo integer NOT NULL REFERENCES photo(identifier), album integer NOT NULL REFERENCES album(identifier), version integer NOT NULL REFERENCES photo_version(identifier), date_changed timestamp without time zone );
None.
None.
Version 2.5
Still in use
= Version 2.5 =
CREATE TABLE album_content ( identifier integer NOT NULL PRIMARY KEY, photo integer NOT NULL REFERENCES photo(identifier), album integer NOT NULL REFERENCES album(identifier) );
= Version 2.34 =
-- Add 'version' to album_content to allow individual versions. ALTER TABLE album_content ADD version integer REFERENCES photo_version(identifier);
ALTER TABLE album_content ALTER version SET NOT NULL;
alter table album_content add date_added timestamp without time zone;
== Data change history =
= Version 2.34 =
UPDATE album_content SET version = (SELECT identifier FROM photo_version v WHERE album_content.photo = v.photo AND v.master = 't');