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')),
  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

Is referenced by other tables

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')),
  small_image_path      varchar(500),
  medium_image_path     varchar(500),
  large_image_path      varchar(500),
  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.txt · Last modified: 2007/10/19 16:02 by Luud
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0