function hook_tripal_get_schema_name_alter

2.x tripal_core.chado_query.api.inc hook_tripal_get_schema_name_alter($schema_name, $context)
3.x tripal_chado.DEPRECATED.api.inc hook_tripal_get_schema_name_alter($schema_name, $context)

Alter the name of the schema housing Chado and/or Drupal.

This example implementation shows a solution for the case where your chado database was well established in the "public" schema and you added Drupal later in a "drupal" schema. Please note that this has not been tested and while we can ensure that Tripal will work as expected, we have no control over whether Drupal is compatible with not being in the public schema. That's why we recommened the organization we have (ie: Chado in a "chado" schema and Drupal in the "public schema).

Parameters

$schema_name: The current name of the schema as known by Tripal. This is likely the default set in tripal_get_schema_name() but in the case of multiple alter hooks, it might be different.

$context: This is an array of items to provide context.

  • schema: this is the schema that was passed to tripal_get_schema_name() and will be either "chado" or "drupal". This should be used to determine you are changing the name of the correct schema.

File

tripal_chado/api/tripal_chado.DEPRECATED.api.inc, line 258
These api functions are deprecated, if your site is currently using them please update your code with the newer tripal_chado functions.

Code

function hook_tripal_get_schema_name_alter($schema_name, $context) 
 {
  hook_chado_get_schema_name_alter($schema_name, $context);
}