File/program/install/tabledefs.php

Description

/program/install/tabledefs.php defines all core tables in a generic way

This is the main data definition for Website@School. This file is used by the installation script install.php to create all main tables.

Here is a reminder for the allowed parameters for field- and key definitions.

FIELDS   | name | type | len | dec | unsigned* | notnull | default | enum_values | comment |
---------+------+------+-----+-----+-----------+---------+---------+-------------+---------+
serial*  | req  | req  |  -  |  -  |     -     |    -    |    -    |    -        |   opt   |
bool     | req  | req  |  -  |  -  |     -     |   opt   |   opt   |    -        |   opt   |
short    | req  | req  | opt |  -  |    opt    |   opt   |   opt   |    -        |   opt   |
int      | req  | req  | opt |  -  |    opt    |   opt   |   opt   |    -        |   opt   |
long     | req  | req  | opt |  -  |    opt    |   opt   |   opt   |    -        |   opt   |
float    | req  | req  | opt | opt |    opt    |   opt   |   opt   |    -        |   opt   |
double   | req  | req  | opt | opt |    opt    |   opt   |   opt   |    -        |   opt   |
decimal  | req  | req  | opt | opt |    opt    |   opt   |   opt   |    -        |   opt   |
number   | req  | req  | opt | opt |    opt    |   opt   |   opt   |    -        |   opt   |
varchar  | req  | req  | opt |  -  |     -     |   opt   |   opt   |    -        |   opt   |
enum     | req  | req  | opt |  -  |     -     |   opt   |   opt   |   req       |   opt   |
char     | req  | req  | opt |  -  |     -     |   opt   |   opt   |    -        |   opt   |
text     | req  | req  |  -  |  -  |     -     |   opt   |    -    |    -        |   opt   |
longtext | req  | req  |  -  |  -  |     -     |   opt   |    -    |    -        |   opt   |
blob     | req  | req  |  -  |  -  |     -     |   opt   |    -    |    -        |   opt   |
longblob | req  | req  |  -  |  -  |     -     |   opt   |    -    |    -        |   opt   |
date     | req  | req  |  -  |  -  |     -     |   opt   |   opt   |    -        |   opt   |
time     | req  | req  |  -  |  -  |     -     |   opt   |   opt   |    -        |   opt   |
datetime | req  | req  |  -  |  -  |     -     |   opt   |   opt   |    -        |   opt   |
timestamp| req  | req  |  -  |  -  |     -     |   opt   |   opt   |    -        |   opt   |

INDICES  | name | type | unique | fields | reftable | reffields | comment |
---------+------+------+--------+--------+----------+-----------+---------+
primary  | -    | req  |   -    |  req   |    -     |     -     |   opt   |
index    | opt  | req  |  opt   |  req   |    -     |     -     |   opt   |
foreign  | opt  | req  |   -    |  req   |   req    |    req    |   opt   |

req = required, opt = optional, - = not allowed

  • author: Peter Fokker <peter@berestijn.nl>
  • version: $Id: tabledefs.php,v 1.14 2016/05/18 05:56:38 peter Exp $
  • copyright: Copyright (C) 2008-2016 Ingenieursbureau PSD/Peter Fokker
  • todo: automatically create appropriate sequence name for serial fields??? or add seqdefs too?
  • license: GNU AGPLv3+Additional Terms

Documentation generated on Tue, 28 Jun 2016 19:12:10 +0200 by phpDocumentor 1.4.0