function tripal_organism_update_7201

2.x tripal_organism.install tripal_organism_update_7201()

Adds the taxonomic rank vocabulary.

File

tripal_organism/tripal_organism.install, line 200
Functions pertaining to the install/uninstall of this module

Code

function tripal_organism_update_7201() {
  try {
    // Make sure we have the full API loaded this will help during a
    // site upgrade when the tripal_core module is disabled.
    module_load_include('module', 'tripal_core', 'tripal_core');
    tripal_core_import_api();
    module_load_include('inc', 'tripal_cv', 'api/tripal_cv.api');

    // Add taxonomic terms.
    $obo_id = tripal_insert_obo('Taxonomic Rank', 'http://purl.obolibrary.org/obo/taxrank.obo');
    tripal_submit_obo_job(array('obo_id' => $obo_id));
  }
  catch (\PDOException $e) {
    $error = $e->getMessage();
    throw new DrupalUpdateException('Could not add taxrank ontology: ' . $error);
  }
}