podoc:photo_version_sql_table
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
podoc:photo_version_sql_table [2007/04/13 10:01] – created Luud | podoc:photo_version_sql_table [2007/10/19 20:02] (current) – Luud | ||
---|---|---|---|
Line 11: | Line 11: | ||
=== Schema === | === Schema === | ||
- | < | + | < |
create table photo_version ( | create table photo_version ( | ||
identifier | identifier | ||
Line 17: | Line 17: | ||
photo | photo | ||
master | master | ||
- | small_image_path | ||
- | medium_image_path | ||
- | large_image_path | ||
date_of_creation | date_of_creation | ||
- | comment | + | comment |
+ | original_image_name | ||
+ | colorspace | ||
+ | orientation | ||
+ | date_changed | ||
); | ); | ||
</ | </ | ||
+ | |||
+ | === References other tables === | ||
+ | |||
+ | * photo references [[photo sql table|photo]](identifier) | ||
+ | * orientation references [[orientations sql table|orientations]](identifier) | ||
+ | |||
+ | === Is referenced by other tables === | ||
+ | |||
+ | * < | ||
+ | * [[photo_dupe sql table]](version) references identifier | ||
=== Related sequences === | === Related sequences === | ||
Line 30: | Line 41: | ||
=== Related indexes === | === Related indexes === | ||
+ | |||
+ | * [[photo_version_photo_idx sql index|photo_version_photo_idx]] | ||
+ | * [[photo_version_photo sql index|photo_version_photo]] | ||
=== Related functions === | === Related functions === | ||
+ | |||
+ | * [[count_photo_versions sql function|count_photo_versions]] | ||
+ | * [[count_photo_versions_by_user sql function|count_photo_versions_by_user]] | ||
=== Related views === | === Related views === | ||
- | * [[view_photo sql view|view_photo]] | + | |
- | * [[view_random_photo sql view|view_random_photo]] | + | * [[view_random_photo sql view|view_random_photo]] |
=== History === | === History === | ||
Line 52: | Line 69: | ||
= Version 2.7 = | = Version 2.7 = | ||
- | < | + | < |
create table photo_version ( | create table photo_version ( | ||
identifier | identifier | ||
Line 66: | Line 83: | ||
</ | </ | ||
- | = Data change history = | + | = Version 2.13 = |
+ | |||
+ | <code sql> | ||
+ | alter table photo_version add column original_image_name varchar(500); | ||
+ | </ | ||
+ | |||
+ | = Version 2.26 = | ||
+ | |||
+ | <code sql> | ||
+ | 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 = | ||
+ | |||
+ | <code sql> | ||
+ | alter table photo_version add date_changed timestamp without time zone; | ||
+ | </ | ||
+ | |||
+ | == Data change history | ||
= Version 2.7 = | = Version 2.7 = | ||
- | < | + | < |
-- populate version control table | -- populate version control table | ||
insert into photo_version | insert into photo_version | ||
select (nextval(' | select (nextval(' | ||
+ | </ | ||
+ | |||
+ | = Version 2.13 = | ||
+ | |||
+ | <code sql> | ||
+ | update photo_version set original_image_name = ' | ||
+ | </ | ||
+ | |||
+ | = Version 2.34 = | ||
+ | |||
+ | <code sql> | ||
+ | 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.1176458470.txt.gz · Last modified: 2007/04/13 10:01 by Luud