You are here

block_term.install in Block Visibility by Term 7

Install, update and uninstall functions for the block_term module.

File

block_term.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the block_term module.
 */

/**
 * Implements hook_schema().
 */
function block_term_schema() {
  $schema['block_term'] = array(
    'description' => 'Sets up display criteria for blocks based on taxonomy terms',
    'fields' => array(
      'module' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'description' => "The block's origin module, from {block}.module.",
      ),
      'delta' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'description' => "The block's unique delta within module, from {block}.delta.",
      ),
      'tid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => "The term ID, from {taxonomy_term_data}.tid",
      ),
    ),
    'primary key' => array(
      'module',
      'delta',
      'tid',
    ),
    'indexes' => array(
      'tid' => array(
        'tid',
      ),
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
block_term_schema Implements hook_schema().