function sbp_paths_schema in Search by Page 6
Same name and namespace in other branches
- 7 sbp_paths.install \sbp_paths_schema()
Implementation of hook_schema().
File
- ./
sbp_paths.install, line 11 - Install hooks for sbp_paths module
Code
function sbp_paths_schema() {
$schema['sbpp_path'] = array(
'description' => t('Contains paths to be indexed by sbp_paths module'),
'fields' => array(
'pid' => array(
'description' => t('Primary key'),
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'environment' => array(
'description' => t('Environment ID'),
'type' => 'int',
'size' => 'big',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
// Do not use 'path' as a db field - reserved word!
'page_path' => array(
'description' => t('Path to index'),
'type' => 'varchar',
'length' => 255,
),
'title' => array(
'description' => t('Title of this page'),
'type' => 'varchar',
'length' => 255,
),
// Do not use 'type' as a db field - reserved word!
'page_type' => array(
'description' => t('Type to display for this page'),
'type' => 'varchar',
'length' => 255,
),
'snippet' => array(
'description' => t('Yes, no, or some custom snippet text'),
'type' => 'text',
'size' => 'medium',
),
'role' => array(
'description' => t('Role ID used to index this path'),
'type' => 'int',
'size' => 'big',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'languages' => array(
'description' => t('Serialized array of languages that can be used for this path'),
'type' => 'text',
),
),
'indexes' => array(
'pth' => array(
'page_path',
),
'ttl' => array(
'title',
),
'envi' => array(
'environment',
),
),
'primary key' => array(
'pid',
),
);
return $schema;
}