You are here

function quicktabs_schema in Quick Tabs 7.2

Same name and namespace in other branches
  1. 6.3 quicktabs.install \quicktabs_schema()
  2. 6 quicktabs.install \quicktabs_schema()
  3. 6.2 quicktabs.install \quicktabs_schema()
  4. 7.3 quicktabs.install \quicktabs_schema()

Implement hook_schema().

File

./quicktabs.install, line 11
Install, update and uninstall functions for the quicktabs module.

Code

function quicktabs_schema() {
  $schema['quicktabs'] = array(
    'description' => 'The quicktabs table.',
    'export' => array(
      'key' => 'machine_name',
      'identifier' => 'quicktabs',
      'default hook' => 'quicktabs_default_quicktabs',
      'api' => array(
        'owner' => 'quicktabs',
        'api' => 'quicktabs',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
    'fields' => array(
      'machine_name' => array(
        'description' => 'The primary identifier for a qt block.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'ajax' => array(
        'description' => 'Whether this is an ajax views block.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'hide_empty_tabs' => array(
        'description' => 'Whether this tabset hides empty tabs.',
        'type' => 'int',
        'size' => 'tiny',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'default_tab' => array(
        'description' => 'Default tab.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'title' => array(
        'description' => 'The title of this quicktabs block.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'tabs' => array(
        'description' => 'A serialized array of the contents of this qt block.',
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
        'serialize' => TRUE,
      ),
      'style' => array(
        'description' => 'The tab style.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'machine_name',
    ),
  );
  return $schema;
}