|
@@ -30,8 +30,7 @@ function tripal_chado_install() {
|
|
|
";
|
|
|
chado_query($sql);
|
|
|
|
|
|
- //Fix the SOFP feature_property issue from the legacy feature_property module.
|
|
|
-
|
|
|
+ // Fix the SOFP feature_property issue from the legacy feature_property.
|
|
|
tripal_chado_fix_legacy_SOFP_7338();
|
|
|
|
|
|
}
|
|
@@ -692,7 +691,12 @@ function tripal_chado_chado_cvterm_mapping_schema() {
|
|
|
|
|
|
/**
|
|
|
* Fixes a problem with the legacy feature_property/SOFP
|
|
|
- * ontology where all terms are relationships.
|
|
|
+ * ontology loaded with previous verions of Chado and all terms are
|
|
|
+ * relationships.
|
|
|
+ *
|
|
|
+ * This function is called by the tripal_chado_install() for a
|
|
|
+ * new Tripal setup, and the tripal_chado_update_7338 for an existing
|
|
|
+ * site.
|
|
|
*/
|
|
|
|
|
|
function tripal_chado_fix_legacy_SOFP_7338() {
|
|
@@ -700,8 +704,8 @@ function tripal_chado_fix_legacy_SOFP_7338() {
|
|
|
$sofp = chado_get_db(['name' => 'SOFP']);
|
|
|
$fp = chado_get_cv(['name' => 'feature_property']);
|
|
|
|
|
|
+ // No need to update unless the SOFP db exists
|
|
|
if (!$sofp || !$fp) {
|
|
|
- // No need to update unless the SOFP db exists
|
|
|
return;
|
|
|
}
|
|
|
$terms = chado_select_record('cvterm', ['cvterm_id', 'name'], [
|
|
@@ -728,8 +732,8 @@ function tripal_chado_fix_legacy_SOFP_7338() {
|
|
|
chado_update_record('cvterm', ['cvterm_id' => $id], ['is_relationshiptype' => 0]);
|
|
|
}
|
|
|
|
|
|
- //repopulate the mview.
|
|
|
- print("repopulating the db2cv mview...");
|
|
|
+ // Repopulate the mview.
|
|
|
+ print("Repopulating the db2cv mview...");
|
|
|
$mview_id = chado_get_mview_id('db2cv_mview');
|
|
|
chado_populate_mview($mview_id);
|
|
|
}
|