You are here

function simplemeta_schema in Simple Meta 7.2

Same name and namespace in other branches
  1. 6.2 simplemeta.install \simplemeta_schema()
  2. 7 simplemeta.install \simplemeta_schema()

Implements hook_schema().

File

./simplemeta.install, line 22
Installation and updating tasks.

Code

function simplemeta_schema() {
  $schema = array();
  $schema['simplemeta'] = array(
    'fields' => array(
      'sid' => array(
        'description' => 'The primary identifier for a Simplemeta data',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'path' => array(
        'description' => 'Primary Key: the Drupal path this entry describes',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'data' => array(
        'description' => 'serialized array of meta data',
        'type' => 'blob',
        'size' => 'big',
        'not null' => TRUE,
        'serialize' => TRUE,
      ),
      'language' => array(
        'description' => 'The language this Simplemeta data is for; blank means all languages',
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
      ),
      'fit' => array(
        'description' => 'A numeric representation of how specific the path is.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'sid',
    ),
    'unique keys' => array(
      'path_language' => array(
        'path',
        'language',
      ),
    ),
  );
  $schema['cache_simplemeta'] = drupal_get_schema_unprocessed('system', 'cache');
  return $schema;
}