function tripal_library_get_schemas
1.x tripal_library.install | tripal_library_get_schemas() |
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_library_get_schemas()
- tripal_library_schema in tripal_library/
tripal_library.install - Implementation of hook_schema().
File
- tripal_library/
tripal_library.install, line 91 - @todo Add file header description
Code
function tripal_library_get_schemas() {
$schema = array();
$schema['chado_library'] = 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
),
'library_id' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0
)
),
'indexes' => array(
'library_id' => array('library_id')
),
'unique keys' => array(
'nid_vid' => array('nid', 'vid'),
'vid' => array('vid')
),
'primary key' => array('nid'),
);
return $schema;
}