You are here

function semantic_fields_schema_1 in Semantic Fields 7

Defines our schema

1 call to semantic_fields_schema_1()
semantic_fields_schema in ./semantic_fields.install
Implements hook_schema().

File

./semantic_fields.install, line 14

Code

function semantic_fields_schema_1() {
  $schema = array();
  $schema['semantic_fields_preset'] = array(
    'description' => t('Table storing preset definitions.'),
    'export' => array(
      'key' => 'name',
      'key name' => 'Name',
      'primary key' => 'id',
      'identifier' => 'preset',
      'default hook' => 'default_semantic_fields_preset',
      'load callback' => 'semantic_fields_preset_load',
      'api' => array(
        'owner' => 'semantic_fields',
        'api' => 'semantic_fields',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'no export' => TRUE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'admin_title' => array(
        'type' => 'varchar',
        'length' => '255',
        'description' => 'The administrative title.',
      ),
      'description' => array(
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'big',
      ),
      'data' => array(
        'type' => 'blob',
        'not null' => FALSE,
        'size' => 'big',
        'serialize' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'indexes' => array(
      'name' => array(
        'name',
      ),
    ),
  );
  return $schema;
}