function tripal_feature_get_schemas
1.x tripal_feature.install | tripal_feature_get_schemas($table = NULL) |
This function simply defines all tables needed for the module to work correctly. By putting the table definitions in a separate function we can easily provide the entire list for hook_install or individual tables for an update.
Related topics
1 call to tripal_feature_get_schemas()
- tripal_feature_schema in tripal_feature/
tripal_feature.install - Implementation of hook_schema().
File
- tripal_feature/
tripal_feature.install, line 144 - @todo Add file header description
Code
function tripal_feature_get_schemas($table = NULL) {
$schema = array();
if (!$table or strcmp($table, 'chado_feature') == 0) {
$schema['chado_feature'] = 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),
'feature_id' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
'sync_date' => array('type' => 'int', 'not null' => FALSE, 'description' => 'UNIX integer sync date/time'),
),
'indexes' => array(
'feature_id' => array('feature_id')
),
'unique keys' => array(
'nid_vid' => array('nid', 'vid'),
'vid' => array('vid')
),
'primary key' => array('nid'),
);
}
return $schema;
}