function tripal_core_install_chado_1_11
2.x tripal_core.chado_install.inc | tripal_core_install_chado_1_11() |
1 call to tripal_core_install_chado_1_11()
- tripal_core_install_chado in tripal_core/
includes/ tripal_core.chado_install.inc - Install Chado Schema
File
- tripal_core/
includes/ tripal_core.chado_install.inc, line 311 - Functions to install chado schema through Drupal
Code
function tripal_core_install_chado_1_11() {
// Get the path to the schema and init SQL files.
$schema_file = drupal_get_path('module', 'tripal_core') .
'/chado_schema/default_schema-1.11.sql';
$init_file = drupal_get_path('module', 'tripal_core') .
'/chado_schema/initialize-1.11.sql';
// Erase the Chado schema if it exists and perform the install.
if (tripal_core_reset_chado_schema()) {
$success = tripal_core_install_sql($schema_file);
if ($success) {
print "Install of Chado v1.11 (Step 1 of 2) Successful!\n";
}
else {
throw new Exception("Installation (Step 1 of 2) Problems! Please check output above for errors.");
}
$success = tripal_core_install_sql($init_file);
if ($success) {
print "Install of Chado v1.11 (Step 2 of 2) Successful.\nInstallation Complete!\n";
}
else {
throw new Exception("Installation (Step 2 of 2) Problems! Please check output above for errors.");
}
}
else {
throw new Exception("ERROR: cannot install chado. Please check database permissions");
}
}