You are here

function facetapi_schema in Facet API 6.3

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

Implementation of hook_schema().

File

./facetapi.install, line 11
Installation 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,
      ),
      'settings' => array(
        'description' => 'Serialized storage of general settings.',
        'type' => 'blob',
        'serialize' => TRUE,
      ),
    ),
    'primary key' => array(
      'name',
    ),
  );
  return $schema;
}