function pagination_schema in Pagination (Node) 6
Same name and namespace in other branches
- 7 pagination.install \pagination_schema()
@desc Implementation of hook_schema()
File
- ./
pagination.install, line 27
Code
function pagination_schema() {
$schema['pagination'] = array(
'description' => t('Extends the {node_type} table with a pagination value.'),
'fields' => array(
'type' => array(
'type' => 'varchar',
'length' => 32,
'not null' => true,
'description' => t('The {node_type} to enable pagination on.'),
),
'paginate' => array(
'type' => 'int',
'unsigned' => true,
'not null' => true,
'default' => 0,
'description' => t('The approximate number of words per page while paginating.'),
),
'style' => array(
'type' => 'int',
'unsigned' => true,
'not null' => true,
'default' => 0,
'description' => t('The paging display style.'),
),
),
'unique keys' => array(
'type' => array(
'type',
),
),
);
$schema['node_pagination'] = array(
'description' => t('Allows storage of page headers for a specific node under automatic paging.'),
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => true,
'not null' => true,
'default' => 0,
'description' => t('The node id associated with the stored page headers.'),
),
'headers' => array(
'type' => 'text',
'not null' => false,
'description' => t('A serialized array of headers associated with a specific node id.'),
),
),
'unique keys' => array(
'nid' => array(
'nid',
),
),
);
return $schema;
}