User Tools

Site Tools


podoc:client_sql_table

Database Table Description of "client"

Name

client

Description

Keeps track of all clients of a particular user.

Purpose

Clients are a special kind of user; this allows a client to access photos that are otherwise not available to the public.

(Note that this will go away in the future via the permission modem rewrite, see 8.)

Schema

CREATE TABLE client (
  identifier            INTEGER NOT NULL PRIMARY KEY,
  users                 INTEGER NOT NULL REFERENCES users(identifier),
  client                INTEGER NOT NULL REFERENCES users(identifier), -- client of user
  date_of_creation      TIMESTAMP,
  STATUS                INTEGER NOT NULL REFERENCES client_status(identifier),
  TRUSTED               CHAR CHECK (TRUSTED IN ('t', 'f'));
);

References tables

  • client references users(identifier)
  • status references client_status(identifier)
  • users references users(identifier)

Is referenced by tables

None.

History

Used first

Version 2.5

Used last

Still in use

Schema change history

= Version 2.5 =

CREATE TABLE client (
  identifier            INTEGER NOT NULL PRIMARY KEY,
  users                 INTEGER NOT NULL REFERENCES users(identifier),
  client                INTEGER NOT NULL REFERENCES users(identifier), -- client of user
  date_of_creation      TIMESTAMP,
  STATUS                INTEGER NOT NULL REFERENCES client_status(identifier)
);

= Version 2.19 =

ALTER TABLE client ADD TRUSTED CHAR CHECK (TRUSTED IN ('t', 'f'));
Data change history

= Version 2.19 =

UPDATE client SET TRUSTED = 'f';
podoc/client_sql_table.txt · Last modified: 2007/04/20 08:12 by Luud