You are here

taxonomy_title.install in Taxonomy Title 6

Same filename and directory in other branches
  1. 5 taxonomy_title.install
  2. 7 taxonomy_title.install

Database set up and clean-up for taxonomy title module.

File

taxonomy_title.install
View source
<?php

/**
 * @file
 * Database set up and clean-up for taxonomy title module.
 */

/**
 * Implementation of hook_install().
 */
function taxonomy_title_install() {

  // Create tables.
  drupal_install_schema('taxonomy_title');
}

/**
 * Implementation of hook_uninstall().
 */
function taxonomy_title_uninstall() {

  // Remove tables.
  drupal_uninstall_schema('taxonomy_title');
  variable_del('taxonomy_title_headings');
  variable_del('taxonomy_title_page_titles');
}

/**
 * Implementation of 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',
        'length' => '11',
        'unsigned' => TRUE,
        'default' => 0,
        'not null' => TRUE,
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => '255',
        'default' => '',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'tid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
taxonomy_title_install Implementation of hook_install().
taxonomy_title_schema Implementation of hook_schema().
taxonomy_title_uninstall Implementation of hook_uninstall().