'abstract', 'def' => 'Publication abstract'), 'tripal_pub', 0, 1, 'tripal'); } /** * Implementation of hook_uninstall(). */ function tripal_pub_uninstall() { //Remove tables drupal_uninstall_schema('tripal_pub'); } /** * Implementation of hook_schema(). */ function tripal_pub_schema() { $schema['chado_pub'] = 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), 'pub_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( 'pub_id' => array('pub_id') ), 'unique keys' => array( 'nid_vid' => array('nid', 'vid'), 'vid' => array('vid') ), 'primary key' => array('nid'), ); /* //a intfield, not null and project_id is the unique_id of the project in chado 'pubmed_id' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, ), 'author' => array( 'type' => 'text', 'size' => 'normal', 'not null' => TRUE, 'default' => '', 'description' => 'The Author Name.', ),*/ return $schema; } /** * Implementation of hook_requirements(). */ function tripal_pub_requirements($phase) { $requirements = array(); if ($phase == 'install') { // make sure chado is installed if (!tripal_core_is_chado_installed()) { $requirements ['tripal_pub'] = array( 'title' => "tripal_pub", 'value' => "ERROR: Chado most be installed before this module can be enabled", 'severity' => REQUIREMENT_ERROR, ); } } return $requirements; }