User Tools

Site Tools


podoc:photo_item_sql_table

Database Table Description of "photo_item"

Name

photo_item

Description

Purpose

Schema

CREATE TABLE photo_item (
  identifier            INTEGER NOT NULL PRIMARY KEY,
  photo                 INTEGER NOT NULL REFERENCES photo(identifier),
  shop_item             INTEGER NOT NULL REFERENCES shop_item(identifier),
  price                 NUMERIC,
  currency              INTEGER REFERENCES currency(identifier),
  comment               text,
  date_of_creation      TIMESTAMP,
  date_of_last_edit     TIMESTAMP
  deleted               CHAR(1) CHECK (deleted IN ('t', 'f'));
);

References tables

  • currency references currency(identifier)
  • photo references photo(identifier)
  • shop_item references shop_item(identifier)

Is referenced by tables

None.

None.

History

Used first

Version 2.8

Used last

Version 2.33

Schema change history

= Version 2.8 =

CREATE TABLE photo_item (
  identifier            INTEGER NOT NULL PRIMARY KEY,
  photo                 INTEGER NOT NULL REFERENCES photo(identifier),
  format                INTEGER NOT NULL REFERENCES photo_format(identifier),
  price                 NUMERIC,
  currency              INTEGER REFERENCES currency(identifier),
  comment               text,
  date_of_creation      TIMESTAMP,
  date_of_last_edit     TIMESTAMP
);

= Version 2.19 =

ALTER TABLE photo_item RENAME COLUMN format TO shop_item;

= Version 2.29 =

ALTER TABLE photo_item ADD deleted CHAR(1) CHECK (deleted IN ('t', 'f'));

= Version 2.34 =

DROP TABLE photo_item;
Data change history

= Version 2.29 =

UPDATE photo_item SET deleted='f';
podoc/photo_item_sql_table.txt · Last modified: 2007/10/19 11:51 by Luud