podoc:photo_sql_table
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
podoc:photo_sql_table [2007/04/20 11:27] – Luud | podoc:photo_sql_table [2007/10/31 15:43] (current) – Luud | ||
---|---|---|---|
Line 11: | Line 11: | ||
=== Schema === | === Schema === | ||
- | < | + | < |
create table photo ( | create table photo ( | ||
identifier | identifier | ||
Line 33: | Line 33: | ||
transmission_reference text, | transmission_reference text, | ||
supplemental_category | supplemental_category | ||
- | web_statement | + | web_statement |
+ | date_added | ||
+ | date_changed | ||
+ | store_url | ||
+ | comments | ||
); | ); | ||
</ | </ | ||
Line 48: | Line 52: | ||
* [[album_content sql table|album_content]](photo) references identifier | * [[album_content sql table|album_content]](photo) references identifier | ||
* [[photo_dupe sql table|photo_dupe]](photo) references identifier | * [[photo_dupe sql table|photo_dupe]](photo) references identifier | ||
+ | * < | ||
+ | * [[photo_keywords sql table|photo_keywords]](photo) references identifier | ||
+ | * < | ||
+ | * [[photo_tech sql table|photo_tech]](photo) references identifier | ||
* [[photo_version sql table|photo_version]](photo) references identifier | * [[photo_version sql table|photo_version]](photo) references identifier | ||
+ | * [[rating sql table|rating]](photo) references identifier | ||
=== Related tables === | === Related tables === | ||
Line 60: | Line 69: | ||
=== Related indexes === | === Related indexes === | ||
- | * [[photo_id_idx sql index|photo_id_idx]] | + | * [[photo_folder sql index|photo_folder]] |
+ | * <del>[[photo_id_idx sql index|photo_id_idx]]</ | ||
* [[photo_users_idx sql index|photo_users_idx]] | * [[photo_users_idx sql index|photo_users_idx]] | ||
* [[photo_location_idx sql index|photo_location_idx]] | * [[photo_location_idx sql index|photo_location_idx]] | ||
Line 93: | Line 103: | ||
= Version 2.5 = | = Version 2.5 = | ||
- | < | + | < |
create table photo ( | create table photo ( | ||
identifier | identifier | ||
Line 110: | Line 120: | ||
= Version 2.6 = | = Version 2.6 = | ||
- | < | + | < |
alter table photo add column views integer; | alter table photo add column views integer; | ||
alter table photo add column copyright_statement text; | alter table photo add column copyright_statement text; | ||
Line 117: | Line 127: | ||
= Version 2.7 = | = Version 2.7 = | ||
- | < | + | < |
-- we rename colums first since droping was implemented only with 7.3 | -- we rename colums first since droping was implemented only with 7.3 | ||
alter table photo rename column small_image_path | alter table photo rename column small_image_path | ||
Line 131: | Line 141: | ||
= Version 2.11 = | = Version 2.11 = | ||
- | < | + | < |
-- add support for original protection | -- add support for original protection | ||
alter table photo add column hide_original | alter table photo add column hide_original | ||
Line 138: | Line 148: | ||
= Version 2.15 = | = Version 2.15 = | ||
- | < | + | < |
alter table photo add column author text; | alter table photo add column author text; | ||
alter table photo add column keyword text; | alter table photo add column keyword text; | ||
Line 146: | Line 156: | ||
= Version 2.17 = | = Version 2.17 = | ||
- | < | + | < |
alter table photo add column caption_writer text; | alter table photo add column caption_writer text; | ||
alter table photo add column category varchar(3); | alter table photo add column category varchar(3); | ||
Line 160: | Line 170: | ||
= Version 2.31 = | = Version 2.31 = | ||
- | < | + | < |
update photo set location = 0 where location is null; | update photo set location = 0 where location is null; | ||
alter table photo alter location set not null; | alter table photo alter location set not null; | ||
Line 167: | Line 177: | ||
= Version 2.33 = | = Version 2.33 = | ||
- | < | + | < |
-- This is called by the upgrade script -- | -- This is called by the upgrade script -- | ||
-- alter table photo drop keyword; | -- alter table photo drop keyword; | ||
+ | </ | ||
+ | |||
+ | = Version 2.34 = | ||
+ | |||
+ | <code sql> | ||
+ | -- Add a field to track when a photo was added | ||
+ | alter table photo add date_added timestamp without time zone; | ||
+ | </ | ||
+ | |||
+ | <code sql> | ||
+ | alter table photo add date_changed timestamp without time zone; | ||
+ | </ | ||
+ | |||
+ | <code sql> | ||
+ | --- Add a ' | ||
+ | alter table photo add store_url text; | ||
+ | </ | ||
+ | |||
+ | <code sql> | ||
+ | -- Add a comments column to the photos. | ||
+ | alter table photo add column comments text; | ||
</ | </ | ||
Line 176: | Line 207: | ||
= Version 2.6 = | = Version 2.6 = | ||
- | < | + | < |
-- set the photo view flag to null for each photo | -- set the photo view flag to null for each photo | ||
update photo set views=0; | update photo set views=0; | ||
Line 183: | Line 214: | ||
= Version 2.11 = | = Version 2.11 = | ||
- | < | + | < |
update photo set hide_original=' | update photo set hide_original=' | ||
</ | </ | ||
Line 189: | Line 220: | ||
= Version 2.15 = | = Version 2.15 = | ||
- | < | + | < |
update photo set caption ='' | update photo set caption ='' | ||
</ | </ | ||
podoc/photo_sql_table.1177068475.txt.gz · Last modified: 2007/04/20 11:27 (external edit)