function legal_schema in Legal 7
Same name and namespace in other branches
- 6.8 legal.install \legal_schema()
- 6.7 legal.install \legal_schema()
- 7.2 legal.install \legal_schema()
Implements hook_schema().
File
- ./
legal.install, line 11 - Installation and update functions for the Legal module.
Code
function legal_schema() {
$schema['legal_conditions'] = array(
'fields' => array(
'tc_id' => array(
'type' => 'serial',
'unsigned' => FALSE,
'not null' => TRUE,
'disp-width' => 10,
),
'version' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
'disp-width' => 11,
),
'revision' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
'disp-width' => 11,
),
'language' => array(
'description' => t("TODO."),
'type' => 'varchar',
'length' => '12',
'not null' => TRUE,
'default' => '',
),
'conditions' => array(
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'date' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
'disp-width' => 11,
),
'extras' => array(
'type' => 'text',
),
'changes' => array(
'type' => 'text',
),
'format' => array(
'type' => 'varchar',
'not null' => FALSE,
'length' => 255,
),
),
'primary key' => array(
'tc_id',
),
);
$schema['legal_accepted'] = array(
'fields' => array(
'legal_id' => array(
'type' => 'serial',
'unsigned' => FALSE,
'not null' => TRUE,
'disp-width' => 10,
),
'version' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
'disp-width' => 11,
),
'revision' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
'disp-width' => 11,
),
'language' => array(
'description' => t("TODO."),
'type' => 'varchar',
'length' => '12',
'not null' => TRUE,
'default' => '',
),
'uid' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
'disp-width' => 10,
),
'accepted' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
'disp-width' => 11,
),
'tc_id' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
'disp-width' => 10,
),
),
'indexes' => array(
'uid' => array(
'uid',
),
),
'primary key' => array(
'legal_id',
),
);
return $schema;
}