TRUE)); } } /** * Implementation of hook_install(). * * @ingroup tripal_legacy_organism */ function tripal_organism_install() { // set the default vocabularies tripal_set_default_cv('organismprop', 'type_id', 'organism_property'); } /** * Implementation of hook_schema(). * * @ingroup tripal_legacy_organism */ function tripal_organism_schema() { $schema['chado_organism'] = 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 ), 'organism_id' => array( 'type' => 'int', 'not null' => TRUE, 'default' => 0 ) ), 'indexes' => array( 'organism_id' => array('organism_id') ), 'unique keys' => array( 'nid_vid' => array('nid', 'vid'), 'vid' => array('vid') ), 'primary key' => array('nid'), ); return $schema; } /** * Implementation of hook_uninstall(). * * @ingroup tripal_legacy_organism */ function tripal_organism_uninstall() { } /** * Implementation of hook_requirements(). * * @ingroup tripal_legacy_organism */ function tripal_organism_requirements($phase) { $requirements = array(); if ($phase == 'install') { // make sure chado is installed if (!$GLOBALS["chado_is_installed"]) { $requirements ['tripal_organism'] = array( 'title' => "tripal_organism", 'value' => "ERROR: Chado must be installed before this module can be enabled", 'severity' => REQUIREMENT_ERROR, ); } } return $requirements; }