function book_copy_schema in Book Copy 6
Same name and namespace in other branches
- 7 book_copy.install \book_copy_schema()
Implementation of hook_schema().
An entry in the {book_copy} table indicates that a book is to be considered personal, meaning that only the owner may add pages to it.
File
- ./
book_copy.install, line 27
Code
function book_copy_schema() {
$schema['book_copy_history'] = array(
'description' => t('This table maintains source history for books derived via the copy feature'),
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('The new nid of the node copied'),
),
'bid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('The target book (when initially copied)'),
),
'sbid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('The source book'),
),
'snid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('The source nid.'),
),
'copied' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('The datetime this was copied'),
),
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('The new uid of the user initiating the copy.'),
),
),
'primary key' => array(
'nid',
),
);
return $schema;
}