function tripal_analysis_schema
2.x tripal_analysis.install | tripal_analysis_schema() |
3.x tripal_analysis.install | tripal_analysis_schema() |
1.x tripal_analysis.install | tripal_analysis_schema() |
Implementation of hook_schema().
- chado_analysis table stores nodes that are also saved in the analysis table of chado database.
- tripal_analysis table stores the sub-module names, such as tripal_analysis_blast, that are registered with this module.
Related topics
File
- tripal_analysis/
tripal_analysis.install, line 182 - Implements hooks from the Schema API.
Code
function tripal_analysis_schema() {
// chado_analysis table
$schema['chado_analysis'] = array(
'fields' => array(
'vid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0
),
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0
),
'analysis_id' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0
)
),
'indexes' => array(
'analysis_id' => array('analysis_id')
),
'unique keys' => array(
'nid_vid' => array('nid', 'vid'),
'vid' => array('vid')
),
'primary key' => array('nid'),
);
// tripal_analysis table
$schema['tripal_analysis'] = array(
'description' => 'Table to store analysis sub-modules',
'fields' => array(
'modulename' => array(
'type' => 'text',
'size' => 'small',
'not null' => TRUE,
'description' => 'The module name. Tripal Analysis will use the module name to call module_setting_form()'
)
),
'unique keys' => array(
'modulename' => array('modulename')
)
);
return $schema;
}