function tripal_core_upgrade_chado_1_11_to_1_2
2.x tripal_core.chado_install.inc | tripal_core_upgrade_chado_1_11_to_1_2() |
Upgrades Chado from v1.11 to v1.2
1 call to tripal_core_upgrade_chado_1_11_to_1_2()
- 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 490 - Functions to install chado schema through Drupal
Code
function tripal_core_upgrade_chado_1_11_to_1_2() {
// Get the path to the schema diff and upgarde SQL files.
$schema_file = drupal_get_path('module', 'tripal_core') .
'/chado_schema/default_schema-1.11-1.2-diff.sql';
$init_file = drupal_get_path('module', 'tripal_core') .
'/chado_schema/upgrade-1.11-1.2.sql';
$success = tripal_core_install_sql($schema_file);
if ($success) {
print "Upgrade from v1.11 to v1.2 (Step 1 of 2) Successful!\n";
}
else {
throw new Exception("Upgrade (Step 1 of 2) problems! Please check output above for errors.");
}
$success = tripal_core_install_sql($init_file);
if ($success) {
print "Upgrade from v1.11 to v1.2 (Step 2 of 2) Successful.\nUpgrade Complete!\n";
}
else {
throw new Exception("Upgrade (Step 2 of 2) problems! Please check output above for errors.");
}
}