function block_revisions_schema in Block Revisions 7
Same name and namespace in other branches
- 6 block_revisions.install \block_revisions_schema()
Implements hook_schema().
File
- ./
block_revisions.install, line 20 - Installation routines for the Block Revisions module.
Code
function block_revisions_schema() {
$schema['boxes_revisions'] = array(
'description' => 'Stores the revision history of content for custom-made blocks.',
'fields' => array(
'brid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => "A unique id for this revision.",
),
'bid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => "The block's {block}.bid.",
),
'vid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => "The revision id.",
),
'uid' => array(
'description' => 'The {users}.uid that created this version.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'body' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'description' => 'Block contents.',
),
'format' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'description' => 'The {filter_format}.format of the block body.',
),
'log' => array(
'description' => 'The log entry explaining the changes in this version.',
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
),
'timestamp' => array(
'description' => 'A Unix timestamp indicating when this version was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'unique keys' => array(
'revision' => array(
'bid',
'vid',
),
),
'primary key' => array(
'brid',
),
);
return $schema;
}