function tripal_chado_views_schema

3.x tripal_chado_views.install tripal_chado_views_schema()

Implementation of hook_schema().

Related topics

File

tripal_chado_views/tripal_chado_views.install, line 24
Functions related to installing/uninstalling this module

Code

function tripal_chado_views_schema() {
  // If Tripal v2 is already installed, then when the module is first enabled
  // after an upgade, the installation of this module will try and recreate
  // some of the tables created with tripal_core and the installation will fail.
  // Therefore, we need to temporarily move those tables out of the way, let
  // the module install and then move them back.
  $migrated = variable_get('tripal_v2_upgrade_v3_check_chado_views', FALSE);
  if (!$migrated) {
    try {
      tripal_chado_views_upgrade_v2_v3_pre_enable();
      variable_set('tripal_v2_upgrade_v3_check_chado_views', TRUE);
    }
    catch (Exception $e) {
      watchdog_exception('tripal_chado_views', $e);
    }
  }
  $schema = tripal_chado_views_get_schemas();
  return $schema;
}