You are here

function ds_schema in Display Suite 6.3

Same name and namespace in other branches
  1. 6.2 ds.install \ds_schema()
  2. 7.2 ds.install \ds_schema()
  3. 7 ds.install \ds_schema()

Implementation of hook_schema().

2 calls to ds_schema()
ds_update_3000 in ./ds.install
Implementation of hook_update_N
ds_update_4 in ./ds.install
Implementation of hook_update_N().

File

./ds.install, line 11
Display suite install file.

Code

function ds_schema() {
  $schema = array();
  $schema['ds_settings'] = array(
    'description' => 'The settings for Display Suite',
    'fields' => array(
      'dsid' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'unsigned' => TRUE,
        'description' => 'Primary ID field for the table. Not used for anything except internal lookups',
      ),
      'name' => array(
        'description' => 'Machine name for the display type',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'module' => array(
        'description' => 'The name of the module',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'type' => array(
        'description' => 'The name of the type',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'build_mode' => array(
        'description' => 'The name of the build mode',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'settings' => array(
        'description' => 'The settings of for this record.',
        'type' => 'text',
        'not null' => TRUE,
        'size' => 'big',
        'default' => '',
      ),
      'fields' => array(
        'description' => 'The fields of for this record.',
        'type' => 'text',
        'not null' => TRUE,
        'size' => 'big',
        'default' => '',
      ),
    ),
    'primary key' => array(
      'dsid',
    ),
    'indexes' => array(
      'module' => array(
        'module',
      ),
      'build_mode' => array(
        'build_mode',
      ),
      'type' => array(
        'type',
      ),
    ),
  );
  return $schema;
}