User Tools

Site Tools


podoc:focal_length_sql_table

Database Table Description of "focal_length"

Name

focal_length

Description

Purpose

Schema

CREATE TABLE focal_length (
  identifier            INTEGER NOT NULL PRIMARY KEY,
  VALUE                 INTEGER
);

References tables

None.

Is referenced by tables

  • lens_type(max_focal_length) references identifier
  • lens_type(min_focal_length) references identifier
  • photo_tech(focal_length) references identifier

None.

None.

History

Used first

Version 2.5

Used last

Still in use

Schema change history

= Version 2.5 =

CREATE TABLE focal_length (
  identifier            INTEGER NOT NULL PRIMARY KEY,
  VALUE                 VARCHAR(10)
);

= Version 2.32 =

-- Convert focal length from a varchar to an integer
ALTER TABLE focal_length ADD value_num INTEGER;
UPDATE focal_length SET value_num = VALUE::text::INTEGER;
ALTER TABLE focal_length DROP VALUE;
ALTER TABLE focal_length RENAME value_num TO VALUE;
Data change history

= Version 2.5 =

INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '5');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '6');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '7');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '8');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '9');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '10');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '11');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '12');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '13');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '14');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '15');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '16');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '17');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '18');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '19');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '20');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '24');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '28');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '35');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '40');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '45');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '50');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '55');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '60');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '70');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '80');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '85');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '90');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '105');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '120');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '135');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '150');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '180');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '200');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '210');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '300');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '400');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '500');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '600');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '800');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '1000');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '1100');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '1200');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '1300');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '2000');

= Version 2.32 =

-- Add more focal lengths.
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 75);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 240);

= Version 2.33 =

-- Add more focal lengths.
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 65);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 95);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 100);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 110);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 115);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 125);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 130);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 140);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 145);
podoc/focal_length_sql_table.txt · Last modified: 2007/04/20 14:27 by Luud