function date_api_schema in Date 6.2
Implementation of hook_schema().
File
- ./
date_api.install, line 44
Code
function date_api_schema() {
$schema['date_format_types'] = array(
'description' => 'For storing configured date format types.',
'fields' => array(
'type' => array(
'description' => 'The date format type, e.g. medium.',
'type' => 'varchar',
'length' => 200,
'not null' => TRUE,
),
'title' => array(
'description' => 'The human readable name of the format type.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'locked' => array(
'description' => 'Whether or not this is a system provided format.',
'type' => 'int',
'size' => 'tiny',
'default' => 0,
'not null' => TRUE,
),
),
'primary key' => array(
'type',
),
);
$schema['date_formats'] = array(
'description' => 'For storing configured date formats.',
'fields' => array(
'dfid' => array(
'description' => 'The date format identifier.',
'type' => 'serial',
'not null' => TRUE,
'unsigned' => TRUE,
),
'format' => array(
'description' => 'The date format string.',
'type' => 'varchar',
'length' => 100,
'not null' => TRUE,
),
'type' => array(
'description' => 'The date format type, e.g. medium.',
'type' => 'varchar',
'length' => 200,
'not null' => TRUE,
),
'locked' => array(
'description' => 'Whether or not this format can be modified.',
'type' => 'int',
'size' => 'tiny',
'default' => 0,
'not null' => TRUE,
),
),
'primary key' => array(
'dfid',
),
'unique keys' => array(
'formats' => array(
'format',
'type',
),
),
);
$schema['date_format_locale'] = array(
'description' => 'For storing configured date formats for each locale.',
'fields' => array(
'format' => array(
'description' => 'The date format string.',
'type' => 'varchar',
'length' => 100,
'not null' => TRUE,
),
'type' => array(
'description' => 'The date format type, e.g. medium.',
'type' => 'varchar',
'length' => 200,
'not null' => TRUE,
),
'language' => array(
'description' => 'A {languages}.language for this format to be used with.',
'type' => 'varchar',
'length' => 12,
'not null' => TRUE,
),
),
'primary key' => array(
'type',
'language',
),
);
return $schema;
}