Tripal
Variables
generate_chado_schema_file.php File Reference

Variables

 $arguments = getopt("v:")
 

Detailed Description

This script will generate the schema file for the Tripal API for an installation of Chado. To use the script you must install the version of Chado desired using Tripal. Next install and enable the 'schema' module from the Drupal module respository. Finally, add a new 'chado' entry in the $databases variable of the settings.php file. For example:

'chado' => array(
'default' => array(
'database' => 'd7x_t2x_c13',
'username' => 'chado',
'password' => 'testing123',
'host' => 'localhost',
'port' => '',
'driver' => 'pgsql',
'prefix' => '',
),
),

This script requires a single argument (-v) which is the Chado version. Redirect output into a new file as desired.

Example usage in drupal directory root:

php ./sites/all/modules/tripal/tripal_core/api/generate_chado_schema_file.php -v 1.11 > \ ./sites/all/modules/tripal/tripal_core/api/tripal_core.schema_v1.11.api.inc.new

php ./sites/all/modules/tripal/tripal_core/api/generate_chado_schema_file.php -v 1.2 > \ ./sites/all/modules/tripal/tripal_core/api/tripal_core.schema_v1.2.api.inc.new

php ./sites/all/modules/tripal/tripal_core/api/generate_chado_schema_file.php -v 1.3 > \ ./sites/all/modules/tripal/tripal_core/api/tripal_core.schema_v1.3.api.inc.new