Sfoglia il codice sorgente

added update function

Stephen Ficklin 6 anni fa
parent
commit
af98435132
1 ha cambiato i file con 25 aggiunte e 0 eliminazioni
  1. 25 0
      tripal_chado/tripal_chado.install

+ 25 - 0
tripal_chado/tripal_chado.install

@@ -1527,3 +1527,28 @@ function tripal_chado_update_7325() {
   }
 }
 
+
+/**
+ * Adding a "Company" term.
+ */
+function tripal_chado_update_7326() {
+  try {
+    // The Company term is missing for the Tripal Contact ontology, but is
+    // useful for the arraydesign.manufacturer which is an FK to Contact.
+    // It seems better to use a term from a curated ontology than to add to
+    // Tripal Contact.
+    $term = chado_insert_cvterm(array(
+      'id' => 'NCIT:C54131',
+      'name' => 'Company',
+      'cv_name' => 'ncit',
+      'definition' => 'Any formal business entity for profit, which may be a corporation, a partnership, association or individual proprietorship. [ NCI http://dictionary.law.com ]',
+    ));
+  }
+  catch (\PDOException $e) {
+    $error = $e->getMessage();
+    throw new DrupalUpdateException('Could not perform update: '. $error);
+  }
+}
+
+
+