array( 'nid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, ), 'vid' => array( 'type' => 'int', 'not null' => TRUE, ), 'project_id' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, ), ), 'primary key' => array('nid', 'vid', 'project_id'), ); return $schema; } /** * Implementation of hook_requirements(). * */ function tripal_project_requirements($phase) { $requirements = array(); if ($phase == 'install') { // make sure chado is installed if (!tripal_core_is_chado_installed()) { $requirements ['tripal_project'] = array( 'title' => "tripal_project", 'value' => "ERROR: Chado most be installed before this module can be enabled", 'severity' => REQUIREMENT_ERROR, ); } } return $requirements; } /* * */ function tripal_project_add_cvterms() { // Insert cvterm 'library_description' into cvterm table of chado // database. This CV term is used to keep track of the library // description in the libraryprop table. tripal_cv_add_cvterm(array('name' => 'project_description', 'def' => 'Description of a project'), 'tripal', 0, 1, 'tripal'); } /** * Update for Drupal 6.x, Tripal 1.0 * This update * - adds the library types * * @ingroup tripal_library */ function tripal_project_update_6000() { // add in the missing library typ cv terms tripal_project_add_cvterms(); return $ret; }