album
This is the list of all albums in the system, including album specifics like their descriptions.
We need to keep track of this stuff.
CREATE TABLE album ( identifier integer NOT NULL PRIMARY KEY, users integer NOT NULL REFERENCES users(identifier), -- the users who uploaded the picture, not necessarily the owner caption text, date_of_creation timestamp, access_rights integer NOT NULL REFERENCES access_type(identifier), description text, parent_album integer REFERENCES album(identifier), password text, date_changed timestamp without time zone, event integer REFERENCES calendar(identifier) );
None.
Version 2.5
Still in use
= Version 2.5 =
CREATE TABLE album ( identifier integer NOT NULL PRIMARY KEY, users integer NOT NULL REFERENCES users(identifier), -- the users who uploaded the picture, not necessarily the owner caption text, date_of_creation timestamp, access_rights integer NOT NULL REFERENCES access_type(identifier) );
= Version 2.18 =
-- 'c' for customers, 'u' for user albums ALTER TABLE album ADD COLUMN type char(1) CHECK (type IN ('c', 'u'));
= Version 2.20 =
ALTER TABLE album ADD orderby integer;
= Version 2.26 =
ALTER TABLE album ADD COLUMN description text;
= Version 2.29 =
ALTER TABLE album ADD COLUMN parent_album integer REFERENCES album(identifier);
= Version 2.34 =
-- Add password support to albums ALTER TABLE album ADD password text;
ALTER TABLE album ADD date_changed timestamp without time zone;
-- Drop 'orderby' fields; they're useless now. ALTER TABLE album DROP orderby;
-- Associate events with albums ALTER TABLE album ADD COLUMN event integer REFERENCES calendar(identifier);
-- this is obselete ALTER TABLE album DROP COLUMN type;
= Version 2.18 =
UPDATE album SET type = 'u';
= Version 2.20 =
UPDATE album SET orderby = 1;
= Version 2.29 =
UPDATE album SET parent_album=NULL;
= Version 2.34 =
-- Add the 'Spool' Album for everyone. INSERT INTO album (identifier, parent_album, users, caption, type, date_of_creation, access_rights, orderby, description) SELECT NEXTVAL('album_id_sequence') AS identifier, NULL AS parent_album, identifier AS users, 'Spool' AS caption, 'u' AS type, now() AS date_of_creation, 3 AS access_rights, 7 AS orderby, NULL AS description FROM users;