podoc:photo_version_sql_table
This is an old revision of the document!
Database Table Description of "photo_version"
Name
photo_version
Description
Purpose
Schema
CREATE TABLE photo_version ( identifier INTEGER NOT NULL PRIMARY KEY, KEY INTEGER NOT NULL, photo INTEGER NOT NULL REFERENCES photo(identifier), master CHAR(1) CHECK (master IN ('t', 'f')), small_image_path VARCHAR(500), medium_image_path VARCHAR(500), large_image_path VARCHAR(500), date_of_creation TIMESTAMP, comment text, original_image_name VARCHAR(500), colorspace INTEGER NOT NULL, orientation INTEGER NOT NULL REFERENCES orientations(identifier),, date_changed TIMESTAMP WITHOUT TIME zone );
References other tables
- photo references photo(identifier)
- orientation references orientations(identifier)
Is referenced by other tables
- imagemagick_composite_options(photo_version) references identifier
Related sequences
Related indexes
Related functions
Related views
History
Used first
Version 2.7
Used last
Still in use
Schema change history
= Version 2.7 =
CREATE TABLE photo_version ( identifier INTEGER NOT NULL PRIMARY KEY, KEY INTEGER NOT NULL, photo INTEGER NOT NULL REFERENCES photo(identifier), master CHAR(1) CHECK (master IN ('t', 'f')), date_of_creation TIMESTAMP, comment text );
= Version 2.13 =
ALTER TABLE photo_version ADD COLUMN original_image_name VARCHAR(500);
= Version 2.26 =
ALTER TABLE photo_version ADD COLUMN colorspace INTEGER; UPDATE photo_version SET colorspace = 1 WHERE colorspace IS NULL; ALTER TABLE photo_version ALTER colorspace SET NOT NULL; ALTER TABLE photo_version ADD COLUMN orientation INTEGER REFERENCES orientations(identifier); UPDATE photo_version SET orientation = 1 WHERE orientation IS NULL; ALTER TABLE photo_version ALTER orientation SET NOT NULL;
= Version 2.34 =
ALTER TABLE photo_version ADD date_changed TIMESTAMP WITHOUT TIME zone;
Data change history
= Version 2.7 =
-- populate version control table INSERT INTO photo_version SELECT (NEXTVAL('photo_version_id_sequence')), 1, identifier, 't', small_image_path, medium_image_path, large_image_path, now(), '' FROM photo;
= Version 2.13 =
UPDATE photo_version SET original_image_name = 'file';
= Version 2.34 =
ALTER TABLE photo_version DROP small_image_path; ALTER TABLE photo_version DROP medium_image_path; ALTER TABLE photo_version DROP large_image_path;
podoc/photo_version_sql_table.1192823548.txt.gz · Last modified: 2007/10/19 19:52 by Luud