podoc:album_sql_table
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
podoc:album_sql_table [2007/04/20 11:26] – Luud | podoc:album_sql_table [2007/10/19 20:45] (current) – Luud | ||
---|---|---|---|
Line 15: | Line 15: | ||
=== Schema === | === Schema === | ||
- | < | + | < |
create table album ( | create table album ( | ||
identifier | identifier | ||
Line 22: | Line 22: | ||
date_of_creation | date_of_creation | ||
access_rights | access_rights | ||
- | type char(1) check (type in (' | ||
- | orderby | ||
description | description | ||
- | parent_album | + | parent_album |
+ | password | ||
+ | date_changed | ||
+ | event | ||
); | ); | ||
</ | </ | ||
Line 32: | Line 33: | ||
* access_rights references [[access_type sql table|access_type]](identifier) | * access_rights references [[access_type sql table|access_type]](identifier) | ||
- | * parent_album references [[album sql table|album]](identifier) | + | |
+ | | ||
* users references [[users sql table|users]](identifier) | * users references [[users sql table|users]](identifier) | ||
Line 46: | Line 48: | ||
=== Related indexes === | === Related indexes === | ||
- | * [[album_id_idx sql index|album_id_idx]] | + | * [[album_event_idx sql index|album_event_idx]] |
+ | * <del>[[album_id_idx sql index|album_id_idx]]</ | ||
* [[album_users_idx sql index|album_users_idx]] | * [[album_users_idx sql index|album_users_idx]] | ||
Line 74: | Line 77: | ||
= Version 2.5 = | = Version 2.5 = | ||
- | | + | <code sql> |
- | identifier | + | create table album ( |
- | users | + | identifier |
- | caption | + | users |
- | date_of_creation | + | caption |
- | access_rights | + | date_of_creation |
- | ); | + | access_rights |
+ | ); | ||
+ | </ | ||
= Version 2.18 = | = Version 2.18 = | ||
- | < | + | < |
-- ' | -- ' | ||
alter table album add column type char(1) check (type in (' | alter table album add column type char(1) check (type in (' | ||
Line 91: | Line 96: | ||
= Version 2.20 = | = Version 2.20 = | ||
- | < | + | < |
alter table album add orderby integer; | alter table album add orderby integer; | ||
</ | </ | ||
Line 97: | Line 102: | ||
= Version 2.26 = | = Version 2.26 = | ||
- | < | + | < |
alter table album add column description text; | alter table album add column description text; | ||
</ | </ | ||
Line 103: | Line 108: | ||
= Version 2.29 = | = Version 2.29 = | ||
- | < | + | < |
alter table album add column | alter table album add column | ||
+ | </ | ||
+ | |||
+ | = Version 2.34 = | ||
+ | |||
+ | <code sql> | ||
+ | -- Add password support to albums | ||
+ | alter table album add password text; | ||
+ | </ | ||
+ | |||
+ | <code sql> | ||
+ | alter table album add date_changed timestamp without time zone; | ||
+ | </ | ||
+ | |||
+ | <code sql> | ||
+ | -- Drop ' | ||
+ | alter table album drop orderby; | ||
+ | </ | ||
+ | |||
+ | <code sql> | ||
+ | -- Associate events with albums | ||
+ | alter table album add column event integer references calendar(identifier); | ||
+ | </ | ||
+ | |||
+ | <code sql> | ||
+ | -- this is obselete | ||
+ | alter table album drop column type; | ||
</ | </ | ||
Line 111: | Line 142: | ||
= Version 2.18 = | = Version 2.18 = | ||
- | < | + | < |
update album set type = ' | update album set type = ' | ||
</ | </ | ||
Line 117: | Line 148: | ||
= Version 2.20 = | = Version 2.20 = | ||
- | < | + | < |
update album set orderby = 1; | update album set orderby = 1; | ||
</ | </ | ||
Line 123: | Line 154: | ||
= Version 2.29 = | = Version 2.29 = | ||
- | < | + | < |
update album set parent_album=null; | update album set parent_album=null; | ||
+ | </ | ||
+ | |||
+ | = Version 2.34 = | ||
+ | |||
+ | <code sql> | ||
+ | -- Add the ' | ||
+ | |||
+ | insert into album (identifier, | ||
+ | date_of_creation, | ||
+ | select nextval(' | ||
+ | null as parent_album, | ||
+ | | ||
+ | ' | ||
+ | ' | ||
+ | now() as date_of_creation, | ||
+ | 3 as access_rights, | ||
+ | 7 as orderby, | ||
+ | null as description | ||
+ | from users; | ||
</ | </ | ||
podoc/album_sql_table.1177068381.txt.gz · Last modified: 2007/04/20 11:26 by Luud