You are here

function tvi_schema in Taxonomy Views Integrator 6

Implements hook_schema().

See also

http://api.drupal.org/api/function/hook_schema/6

Related topics

File

./tvi.install, line 18
Installation file for TVI module.

Code

function tvi_schema() {
  module_load_include('module', 'tvi');
  $schema = array();
  $schema['tvi_settings'] = array(
    'description' => 'Stores data relating a view display with a taxonomy term or vocabulary.',
    'fields' => array(
      'type' => array(
        'type' => 'varchar',
        'length' => 50,
        'not null' => TRUE,
        'default' => TVI_TYPE_TERM,
        'description' => 'The type of taxonomy view setting. Can be; TVI_TYPE_TERM or TVI_TYPE_VOCAB.',
      ),
      'xid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Taxonomy vocabulary or term ID.',
      ),
      'view_name' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The view name that is used for this taxonomy display.',
      ),
      'display' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => TVI_DEFAULT_DISPLAY,
        'description' => 'The view display to use.',
      ),
      'status' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'A flag to indicate whether to use or not.',
      ),
      'description_enabled' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 1,
        'description' => 'A flag to indicate whether to display the term/voc description or not.',
      ),
    ),
    'primary key' => array(
      'type',
      'xid',
    ),
  );
  return $schema;
}