You are here

function termstatus_schema in Taxonomy Term Status 7

Implements hook_schema().

File

./termstatus.install, line 59
Install, update and uninstall functions for the termstatus module.

Code

function termstatus_schema() {
  $schema['termstatus'] = array(
    'description' => 'The base table for termstatus.',
    'fields' => array(
      'tid' => array(
        'description' => 'Primary Key: The {taxonomy_term_data}.tid of the term.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'status' => array(
        'description' => 'Boolean indicating whether the term is published (visible to non-administrators).',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
      ),
    ),
    'primary key' => array(
      'tid',
    ),
    'term_status' => array(
      'tid',
      'status',
    ),
    'foreign keys' => array(
      'taxonomy_term_data' => array(
        'table' => 'taxonomy_term_data',
        'columns' => array(
          'tid' => 'tid',
        ),
      ),
    ),
  );
  return $schema;
}