function skinr_context_schema in Skinr 7.2
Same name and namespace in other branches
- 8.2 skinr_context/skinr_context.install \skinr_context_schema()
Implements hook_schema().
File
- skinr_context/
skinr_context.install, line 11 - Contains install, update, and uninstall functions for Skinr Context.
Code
function skinr_context_schema() {
$schema['skinr_groups'] = array(
'description' => 'Stores skin configuration group data for Skinr.',
'fields' => array(
'gid' => array(
'description' => 'Primary Key: Unique machine readable name for this skin configuration group.',
'type' => 'varchar',
'length' => 96,
'not null' => TRUE,
),
'module' => array(
'description' => 'The module this group applies to.',
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => '',
),
'element' => array(
'description' => 'The element this group applies to.',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => 'The administrative title for this group.',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
),
'description' => array(
'description' => 'Description for this group.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'conditions' => array(
'description' => 'Serialized storage of all context condition settings.',
'type' => 'text',
'serialize' => TRUE,
),
'condition_mode' => array(
'description' => 'Condition mode for this context.',
'type' => 'int',
'default' => 0,
),
'weight' => array(
'description' => 'Weight of the group. Lighter weights are higher up, heavier weights go down.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'status' => array(
'description' => 'Boolean indicating whether or not this item is enabled.',
'type' => 'int',
'not null' => TRUE,
'default' => 1,
'size' => 'tiny',
),
),
'primary key' => array(
'gid',
),
'indexes' => array(
'module' => array(
'module',
),
'element' => array(
'module',
'element',
),
),
);
$schema['skinr_group_skins'] = array(
'description' => 'Associates skin configurations with a particular group.',
'fields' => array(
'gid' => array(
'description' => 'The skin configuration group ID.',
'type' => 'varchar',
'length' => 96,
'not null' => TRUE,
),
'sid' => array(
'description' => 'The skin configuration ID.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'primary key' => array(
'gid',
'sid',
),
'indexes' => array(
'gid' => array(
'gid',
),
),
);
return $schema;
}