You are here

function themekey_schema in ThemeKey 7.3

Same name and namespace in other branches
  1. 6.4 themekey.install \themekey_schema()
  2. 6 themekey.install \themekey_schema()
  3. 6.2 themekey.install \themekey_schema()
  4. 6.3 themekey.install \themekey_schema()
  5. 7 themekey.install \themekey_schema()
  6. 7.2 themekey.install \themekey_schema()

Implements hook_schema().

2 calls to themekey_schema()
themekey_css_schema in themekey_css/themekey_css.install
Implements hook_schema().
themekey_redirect_schema in themekey_redirect/themekey_redirect.install
Implements hook_schema().

File

./themekey.install, line 19
Database schema of

Code

function themekey_schema() {
  $schema = array();
  $schema['themekey_properties'] = array(
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'property' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'operator' => array(
        'type' => 'varchar',
        'length' => 2,
        'not null' => TRUE,
        'default' => '=',
      ),
      'value' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'weight' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'theme' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'enabled' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'wildcards' => array(
        'type' => 'text',
        'not null' => TRUE,
        'size' => 'big',
        'serialize' => TRUE,
      ),
      'parent' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'module' => array(
        'description' => 'The name of the module that created this entry.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'indexes' => array(
      'enabled_parent_weight' => array(
        'enabled',
        'parent',
        'weight',
      ),
      'parent_weight' => array(
        'parent',
        'weight',
      ),
    ),
  );
  return $schema;
}