Преглед на файлове

Update to tripal_gffcds_temp table

Stephen Ficklin преди 8 години
родител
ревизия
96eab3322b
променени са 1 файла, в които са добавени 16 реда и са изтрити 0 реда
  1. 16 0
      tripal_chado/tripal_chado.install

+ 16 - 0
tripal_chado/tripal_chado.install

@@ -726,4 +726,20 @@ function tripal_chado_chado_cvterm_mapping_schema() {
     ),
   );
   return $schema;
+}
+
+/**
+ * Fixes the phase on the tripal_gffcds_temp table used for importing GFF files.
+ *
+ */
+function tripal_chado_update_7200() {
+  try {
+    if (chado_table_exists('tripal_gffcds_temp')) {
+      chado_query("ALTER TABLE {tripal_gffcds_temp} ALTER COLUMN phase DROP NOT NULL;");
+    }
+  }
+  catch (\PDOException $e) {
+    $error = $e->getMessage();
+    throw new DrupalUpdateException('Could not fix phase on tripal_gffcds_temp table: '. $error);
+  }
 }