You are here

function delta_schema in Delta 7

Same name and namespace in other branches
  1. 6 delta.install \delta_schema()
  2. 7.3 delta.install \delta_schema()
  3. 7.2 delta.install \delta_schema()

Implementation of hook_schema

See also

http://api.drupal.org/api/function/hook_schema/6

File

./delta.install, line 36

Code

function delta_schema() {
  $schema['delta_theme_settings'] = array(
    'description' => t('Stores theme-settings templates that allow overriding the theme settings used based on various contexts.'),
    'fields' => array(
      'tid' => array(
        'description' => t('Theme Settings Template ID'),
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'name' => array(
        'description' => t('Friendly name for this template'),
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'theme' => array(
        'description' => t('TODO: please describe this field!'),
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'data' => array(
        'description' => t('Serialized data which is a copy of the theme settings array stored in the system table based on these overrides'),
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'tid',
    ),
  );
  $schema['delta_theme_overrides'] = array(
    'description' => t('Override criteria for when to display an alternate theme settings template.'),
    'fields' => array(
      'did' => array(
        'description' => t('Delta ID'),
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'tid' => array(
        'description' => t('Template ID'),
        'type' => 'int',
        'not null' => TRUE,
      ),
      'system_name' => array(
        'description' => t('usable system name'),
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'name' => array(
        'description' => t('readable pretty name'),
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'value' => array(
        'description' => t('the stored serialized array of theme-settings'),
        'type' => 'text',
        'not null' => TRUE,
      ),
      'weight' => array(
        'description' => t('the priority weight of the override. Allows multiple overrides to apply to same content, then determines which takes priority.'),
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
      'theme' => array(
        'description' => t('TODO: please describe this field!'),
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'did',
    ),
  );
  return $schema;
}