TRUE)); } } /** * Implementation of hook_requirements(). * */ function tripal_stock_requirements($phase) { $requirements = array(); if ($phase == 'install') { // make sure chado is installed if (!$GLOBALS["chado_is_installed"]) { $requirements ['tripal_stock'] = array( 'title' => "tripal_stock", 'value' => "ERROR: Chado must be installed before this module can be enabled", 'severity' => REQUIREMENT_ERROR, ); } } return $requirements; } /** * Implementation of hook_install(). */ function tripal_stock_install() { // create the module's data directory tripal_create_files_dir('tripal_stock'); } /** * Implementation of hook_uninstall(). */ function tripal_stock_uninstall() { } /** * Implementation of hook_schema(). */ function tripal_stock_schema() { $schema['chado_stock'] = array( 'fields' => array( 'vid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, ), 'nid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, ), 'stock_id' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, ), ), 'indexes' => array( 'stock_id' => array('stock_id'), 'nid' => array('nid'), ), 'unique' => array( 'stock_id' => array('stock_id'), ), 'primary key' => array('vid'), ); return $schema; }