function finder_schema in Finder 7
Same name and namespace in other branches
- 6 finder.install \finder_schema()
- 7.2 finder.install \finder_schema()
Implements hook_schema().
See also
File
- ./
finder.install, line 23 - Finder module install file.
Code
function finder_schema() {
$schema['finder'] = array(
'description' => 'The base table for finders, each row is a finder object.',
'fields' => array(
'finder_id' => array(
'description' => 'The primary identifier for a finder.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'base' => array(
'description' => 'Base findable for finder.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => 'The title of this finder.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'description' => array(
'description' => 'The description of this finder.',
'type' => 'text',
'size' => 'big',
),
'path' => array(
'description' => 'Path for finder functions.',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
),
'block' => array(
'description' => 'Provide block for this finder.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
),
'settings' => array(
'description' => 'Settings for this finder.',
'type' => 'text',
'size' => 'big',
'serialize' => TRUE,
),
),
'primary key' => array(
'finder_id',
),
);
$schema['finder_element'] = array(
'description' => 'The table for finder elements, each row is a finder element.',
'fields' => array(
'finder_element_id' => array(
'description' => 'The primary identifier for a finder element.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'finder_id' => array(
'description' => 'The primary identifier for a finder.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'element' => array(
'description' => 'Form element for this finder element.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => 'The title of this finder element.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'weight' => array(
'description' => 'The ordering of this element.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
),
'settings' => array(
'description' => 'Settings for this finder element.',
'type' => 'text',
'size' => 'big',
'serialize' => TRUE,
),
),
'primary key' => array(
'finder_element_id',
),
);
$schema['cache_finder_find'] = finder_fetch_cache_schema('Used by Finder to cache options and results.');
return $schema;
}