1, ); return $ret; } /************************************************************************ * Implementation of hook_schema(). */ function tripal_cv_schema() { $schema = tripal_cv_get_schemas(); return $schema; } /******************************************************************************* * Implementation of hook_uninstall() */ function tripal_cv_uninstall(){ // remove the materialized view $mview = tripal_mviews_get_mview_id('cv_root_mview'); if($mview){ tripal_mviews_action('delete',$mview); } drupal_uninstall_schema('tripal_cv'); } /******************************************************************************* * Implementation of hook_requirements(). Make sure 'Tripal Core' is enabled * before installation */ function tripal_cv_requirements($phase) { $requirements = array(); if ($phase == 'install') { if (!function_exists('tripal_create_moddir')) { $requirements ['tripal_cv'] = array( 'title' => "tripal_cv", 'value' => "Required modules must be installed first before Tripal CV module can be installed", 'severity' => REQUIREMENT_ERROR, ); } } return $requirements; } /************************************************************************ * 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. */ function tripal_cv_get_schemas (){ $schema = array(); $schema['tripal_obo'] = array( 'fields' => array( 'cv_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), 'file' => array('type' => 'varchar','length' => 1024), 'url' => array('type' => 'varchar','length' => 1024), ), 'indexes' => array( 'cv_id' => array('cv_id') ), 'primary key' => array('cv_id'), ); return $schema; }