podoc:aperture_sql_table
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
podoc:aperture_sql_table [2007/04/13 09:20] – Luud | podoc:aperture_sql_table [2007/04/20 14:22] (current) – Luud | ||
---|---|---|---|
Line 6: | Line 6: | ||
=== Description === | === Description === | ||
+ | |||
+ | This table contains a list of all valid apertures (eg f/2, f/5.6, etc). | ||
=== Purpose === | === Purpose === | ||
+ | |||
+ | To enforce referential integrity. | ||
+ | |||
+ | Note: This table will likely be eliminated in the future in favor of direct aperture representation -- this is an unnecessary abstraction. | ||
=== Schema === | === Schema === | ||
- | | + | <code sql> |
- | identifier | + | create table aperture ( |
- | value | + | identifier |
- | ); | + | value |
+ | ); | ||
+ | </ | ||
+ | |||
+ | === References tables === | ||
+ | |||
+ | None. | ||
+ | |||
+ | === Is referenced by tables === | ||
+ | |||
+ | * [[lens_type sql table|lens_type]](max_aperture) references identifier | ||
+ | * [[lens_type sql table|lens_type]](min_aperture) references identifier | ||
+ | * [[photo_tech sql table|photo_tech]](aperture) references identifier | ||
=== Related sequences === | === Related sequences === | ||
Line 21: | Line 39: | ||
=== Related indexes === | === Related indexes === | ||
+ | |||
+ | None. | ||
=== Related functions === | === Related functions === | ||
+ | |||
+ | None. | ||
=== Related views === | === Related views === | ||
+ | |||
+ | * [[view_lens sql view|view_lens]] | ||
+ | * [[view_lens_type sql view|view_lens_type]] | ||
=== History === | === History === | ||
Line 40: | Line 65: | ||
= Version 2.5 = | = Version 2.5 = | ||
- | | + | <code sql> |
- | identifier | + | create table aperture ( |
- | value varchar(10) | + | identifier |
- | ); | + | value numeric |
+ | ); | ||
+ | </ | ||
+ | |||
+ | = Version 2.32 = | ||
+ | |||
+ | <code sql> | ||
+ | -- Convert aperture from a varchar to a numeric type | ||
+ | alter table aperture add value_num numeric; | ||
+ | update aperture set value_num = value:: | ||
+ | alter table aperture drop value; | ||
+ | alter table aperture rename value_num to value; | ||
+ | </ | ||
== Data change history == | == Data change history == | ||
Line 49: | Line 86: | ||
= Version 2.5 = | = Version 2.5 = | ||
- | < | + | < |
insert into aperture values (nextval(' | insert into aperture values (nextval(' | ||
insert into aperture values (nextval(' | insert into aperture values (nextval(' |
podoc/aperture_sql_table.1176456019.txt.gz · Last modified: 2007/04/13 09:20 by Luud