taxonomy_title.install in Taxonomy Title 7
Same filename and directory in other branches
Database set up and clean-up for the taxonomy title module.
File
taxonomy_title.installView source
<?php
/**
* @file
* Database set up and clean-up for the taxonomy title module.
*/
/**
* Implementation of hook_uninstall().
*/
function taxonomy_title_uninstall() {
// Remove additional variables.
variable_del('taxonomy_title_headings');
variable_del('taxonomy_title_page_titles');
}
/**
* Implements hook_schema().
*/
function taxonomy_title_schema() {
$schema['taxonomy_title'] = array(
'description' => 'Records separate titles/headings for taxonomy term pages',
'fields' => array(
'tid' => array(
'type' => 'int',
'unsigned' => TRUE,
'default' => 0,
'not null' => TRUE,
),
'title' => array(
'type' => 'varchar',
'length' => '255',
'default' => '',
'not null' => TRUE,
),
),
'primary key' => array(
'tid',
),
);
return $schema;
}
/**
* Implements hook_update_N(). Remove length from tid field in database.
*/
function taxonomy_title_update_7001() {
$spec = array(
'type' => 'int',
'unsigned' => TRUE,
'default' => 0,
'not null' => TRUE,
);
db_change_field('taxonomy_title', 'tid', 'tid', $spec);
}
Functions
Name![]() |
Description |
---|---|
taxonomy_title_schema | Implements hook_schema(). |
taxonomy_title_uninstall | Implementation of hook_uninstall(). |
taxonomy_title_update_7001 | Implements hook_update_N(). Remove length from tid field in database. |