function modr8_schema in modr8 7
Same name and namespace in other branches
- 6 modr8.install \modr8_schema()
Implements hook_schema().
File
- ./
modr8.install, line 28 - Install, update and uninstall functions for the modr8 module. TODO: write upgrade from Drupal 6.
Code
function modr8_schema() {
$schema = array();
$schema['modr8_log'] = array(
'fields' => array(
'modid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'author_uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'action' => array(
'type' => 'varchar',
'length' => 16,
'not null' => TRUE,
'default' => '',
),
'title' => array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
),
'message' => array(
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'teaser' => array(
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'timestamp' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'nid_time' => array(
'nid',
'modid',
),
'time_action' => array(
'timestamp',
'action',
),
),
'primary key' => array(
'modid',
),
);
return $schema;
}