function fusion_apply_schema in Fusion Accelerator 7
Same name and namespace in other branches
- 7.2 fusion_apply/fusion_apply.install \fusion_apply_schema()
Implements hook_schema().
File
- fusion_apply/
fusion_apply.install, line 11 - Contains install, update, and uninstall functions for Fusion Apply.
Code
function fusion_apply_schema() {
$schema['fusion_apply_skins'] = array(
'description' => 'Stores Fusion Apply data.',
'fields' => array(
'sid' => array(
'description' => 'The primary identifier for a skin configuration.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'theme' => array(
'description' => 'The theme this configuration applies to.',
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => '',
),
'module' => array(
'description' => 'The module this configuration applies to.',
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => '',
),
'element' => array(
'description' => 'The element this configuration applies to.',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
),
'skin' => array(
'description' => 'The skin that has been applied.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'options' => array(
'description' => 'A serialized array containing the skin options that have been applied.',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
'serialize' => TRUE,
),
'status' => array(
'description' => 'Boolean indicating whether or not this item is enabled.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
),
),
'primary key' => array(
'sid',
),
'unique keys' => array(
'theme_module_element_skin' => array(
'theme',
'module',
'element',
'skin',
),
),
'indexes' => array(
'theme' => array(
'theme',
),
'module' => array(
'theme',
'module',
),
'element' => array(
'theme',
'module',
'element',
),
'skin' => array(
'skin',
),
),
);
// @todo - move to fusion_apply_rules.install
$schema['fusion_apply_rules'] = array(
'description' => 'Stores skin rule data.',
'fields' => array(
'rid' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key: Unique skin rule ID.',
),
'title' => array(
'description' => 'The administrative title for this rule.',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
),
'rule_type' => array(
'description' => 'The content type of this rule.',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
),
'node_types' => array(
'type' => 'text',
'size' => 'normal',
'not null' => FALSE,
'serialize' => TRUE,
'description' => 'A serialized array of node types for this record.',
),
'roles' => array(
'type' => 'text',
'size' => 'normal',
'not null' => FALSE,
'serialize' => TRUE,
'description' => 'A serialized array of roles for this record.',
),
'visibility' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => 'Flag to indicate how to show rules on pages. (0 = Show on all pages except listed pages, 1 = Show only on listed pages, 2 = Use custom PHP code to determine visibility)',
),
'pages' => array(
'type' => 'text',
'not null' => TRUE,
'description' => 'Contains either a list of paths on which to include/exclude the rule or PHP code, depending on "visibility" setting.',
),
),
'primary key' => array(
'rid',
),
);
return $schema;
}