function taxonomy_menu_schema in Taxonomy menu 6.3
Same name and namespace in other branches
- 8 taxonomy_menu.install \taxonomy_menu_schema()
- 6.2 taxonomy_menu.install \taxonomy_menu_schema()
- 7.2 taxonomy_menu.install \taxonomy_menu_schema()
- 7 taxonomy_menu.install \taxonomy_menu_schema()
Implementation of hook_schema().
1 call to taxonomy_menu_schema()
File
- ./
taxonomy_menu.install, line 48 - Install and uninstall all required databases. Also do incremental database updates.
Code
function taxonomy_menu_schema() {
$schema['taxonomy_menu_group'] = array(
'description' => t('Taxonomy Menu Groups'),
'fields' => array(
'mgid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'parent_menu' => array(
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
'default' => '',
'description' => t('Parent Menu Link ID'),
),
'name' => array(
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
'default' => '',
'description' => t('Menu Group Name'),
),
'path' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => 50,
'default' => 'taxonomy_menu_path_default',
'description' => t('Path Type'),
),
'items' => array(
'description' => 'Associated Term Set IDs.',
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
),
),
'primary key' => array(
'mgid',
),
'indexes' => array(
'path' => array(
'path',
),
),
);
$schema['taxonomy_menu_term_set'] = array(
'description' => t('Taxonomy Menu Term Sets'),
'fields' => array(
'tsid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => t('Taxonomy Menu Term Set ID'),
),
'name' => array(
'type' => 'varchar',
'length' => 50,
'description' => t('Term Set Name'),
),
'vid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('Vocba ID'),
),
'items' => array(
'description' => 'tree of tids for the term set.',
'type' => 'text',
'size' => 'big',
'serialize' => TRUE,
),
),
'primary key' => array(
'tsid',
),
);
$schema['taxonomy_menu_group_term_set'] = array(
'description' => t('Relationship between menu group and term set'),
'fields' => array(
'tsid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('Taxonomy Menu Term Set ID'),
),
'parent_item' => array(
'type' => 'varchar',
'length' => 50,
'description' => t('Parent Term Set ID:Term ID'),
),
'mgid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('The taxonomy menu group id'),
),
),
'primary key' => array(
'tsid',
'mgid',
),
'indexes' => array(
'tsid' => array(
'tsid',
),
'mgid' => array(
'mgid',
),
),
);
$schema['taxonomy_menu_options'] = array(
'description' => t('Taxonomy Mneu Options'),
'fields' => array(
'name' => array(
'type' => 'varchar',
'length' => 50,
'description' => t('Option Name'),
),
'value' => array(
'type' => 'varchar',
'length' => 50,
'description' => t('Option Value'),
),
'type' => array(
'type' => 'varchar',
'length' => 50,
'description' => t('Option key'),
),
'type_key' => array(
'type' => 'varchar',
'length' => 50,
'description' => t('Key from type'),
),
),
'primary key' => array(
'name',
'type',
'type_key',
),
'indexes' => array(
'type' => array(
'type',
),
'type_key' => array(
'type_key',
),
'name' => array(
'name',
),
'type_type_key' => array(
'type',
'type_key',
),
),
);
return $schema;
}