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