podoc:photo_dupe_sql_table
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
podoc:photo_dupe_sql_table [2007/04/12 12:30] – Luud | podoc:photo_dupe_sql_table [2007/10/31 15:38] (current) – Luud | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Database Table Description ===== | + | ===== Database Table Description |
=== Name === | === Name === | ||
+ | |||
+ | photo_dupe | ||
=== Description === | === Description === | ||
Line 8: | Line 10: | ||
=== Schema === | === Schema === | ||
+ | |||
+ | <code sql> | ||
+ | create table photo_dupe ( | ||
+ | identifier | ||
+ | key | ||
+ | photo | ||
+ | date_of_creation | ||
+ | storage_location | ||
+ | storage_index | ||
+ | remark | ||
+ | version | ||
+ | ); | ||
+ | </ | ||
+ | |||
+ | === References other tables === | ||
+ | |||
+ | * photo references [[photo sql table|photo]](identifier) | ||
+ | * version references [[photo_version sql table|photo_version]](identifier) | ||
+ | |||
+ | === Is referenced by other tables === | ||
+ | |||
+ | * < | ||
=== Related sequences === | === Related sequences === | ||
+ | |||
+ | * [[photo_dupe_id_sequence sql sequence|photo_dupe_id_sequence]] | ||
=== Related indexes === | === Related indexes === | ||
+ | |||
+ | * [[photo_dupe_version_idx sql index|photo_dupe_version_idx]] | ||
=== Related functions === | === Related functions === | ||
+ | |||
+ | * [[number_of_dupes sql function|number_of_dupes]] | ||
=== Related views === | === Related views === | ||
+ | |||
+ | * [[view_photo sql view|view_photo]] | ||
+ | * < | ||
=== History === | === History === | ||
Line 27: | Line 60: | ||
Still in use | Still in use | ||
- | == Change | + | == Schema change |
= Version 2.5 = | = Version 2.5 = | ||
- | | + | <code sql> |
- | ... | + | create table photo_dupe ( |
- | | + | identifier |
+ | key | ||
+ | photo | ||
+ | date_of_creation | ||
+ | storage_location | ||
+ | storage_index | ||
+ | remark | ||
+ | ); | ||
+ | </ | ||
+ | |||
+ | = Version 2.34 = | ||
+ | |||
+ | <code sql> | ||
+ | -- Add ' | ||
+ | |||
+ | |||
+ | ALTER TABLE photo_dupe | ||
+ | ADD version integer REFERENCES photo_version(identifier); | ||
+ | |||
+ | |||
+ | ALTER TABLE photo_dupe ALTER version SET NOT NULL; | ||
+ | </ | ||
+ | |||
+ | == Data change history = | ||
+ | |||
+ | = Version 2.34 = | ||
+ | |||
+ | <code sql> | ||
+ | UPDATE photo_dupe set version = | ||
+ | (SELECT identifier from photo_version v | ||
+ | | ||
+ | </ |
podoc/photo_dupe_sql_table.txt · Last modified: 2007/10/31 15:38 by Luud