You are here

function facetapi_schema in Facet API 7

Same name and namespace in other branches
  1. 6.3 facetapi.install \facetapi_schema()
  2. 6 facetapi.install \facetapi_schema()
  3. 7.2 facetapi.install \facetapi_schema()

Implementation of hook_schema().

File

./facetapi.install, line 11
Install, update, and uninstall functions for the Facet API module.

Code

function facetapi_schema() {
  $schema['facetapi'] = array(
    'description' => 'Facet configurations.',
    'export' => array(
      'key' => 'name',
      'identifier' => 'facet',
      'default hook' => 'facetapi_default_facet_settings',
      'api' => array(
        'owner' => 'facetapi',
        'api' => 'facetapi_defaults',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
    'fields' => array(
      'name' => array(
        'description' => 'The machine readable name of the configuration.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'searcher' => array(
        'description' => 'The machine readable name of the searcher.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'realm' => array(
        'description' => 'The machine readable name of the realm.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'facet' => array(
        'description' => 'The machine readable name of the facet.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'enabled' => array(
        'description' => 'Whether the facet is enabled.',
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
      'hash' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '0',
        'description' => 'Unique hash ID for facet.',
      ),
      'settings' => array(
        'description' => 'Serialized storage of general settings.',
        'type' => 'blob',
        'serialize' => TRUE,
      ),
    ),
    'primary key' => array(
      'name',
    ),
  );
  return $schema;
}