function tripal_cv_update_7200

2.x tripal_cv.install tripal_cv_update_7200()

This is the required update for tripal_cv when upgrading from Drupal core API 6.x.

File

tripal_cv/tripal_cv.install, line 267
Contains functions executed only on install/uninstall of this module

Code

function tripal_cv_update_7200() {

  // 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();

  // add in the new tripal_cv_defaults table
  try {
    $schema = array();
    tripal_cv_get_tripal_cv_defaults_table($schema);
    db_create_table('tripal_cv_defaults', $schema['tripal_cv_defaults']);
  }
  catch (\PDOException $e) {
    $error = $e->getMessage();
    throw new DrupalUpdateException('Failed to create tripal_cv_defaults table: ' . $error);
  }
}