You are here

function editablefields_schema in Editable Fields 6.3

Implementation of hook_schema().

File

./editablefields.install, line 11
Provides installation related function to editablefields module.

Code

function editablefields_schema() {
  $schema['editablefields_preset'] = array(
    'description' => t('Table storing preset definitions.'),
    'export' => array(
      'key' => 'name',
      'identifier' => 'preset',
      // Exports will be defined as $preset
      'default hook' => 'default_editablefields_preset',
      // Function hook name.
      'api' => array(
        'owner' => 'editablefields',
        'api' => 'default_editablefields_presets',
        // Base name for api include files.
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
    'fields' => array(
      'name' => array(
        'type' => 'varchar',
        'length' => '255',
        'description' => 'Unique ID for presets. Used to identify them programmatically.',
      ),
      'pid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'Primary ID field for the table. Not used for anything except internal lookups.',
        'no export' => TRUE,
      ),
      'description' => array(
        'type' => 'varchar',
        'length' => '255',
        'description' => 'A human readable name of a preset.',
      ),
      'config' => array(
        'type' => 'text',
        'size' => 'big',
        'description' => 'Configuration data.',
      ),
    ),
    'primary key' => array(
      'pid',
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
  );
  return $schema;
}