Jelajahi Sumber

changed chado_bundle.type_id to a bigint

Stephen Ficklin 6 tahun lalu
induk
melakukan
d4e6adbc9f
1 mengubah file dengan 21 tambahan dan 2 penghapusan
  1. 21 2
      tripal_chado/tripal_chado.install

+ 21 - 2
tripal_chado/tripal_chado.install

@@ -620,8 +620,8 @@ function tripal_chado_chado_bundle_schema() {
       ),
       'type_id' => array(
         'description' => 'If a type_column is set then this is the cvterm_id of the data type that this bundle maps to.',
-        'type' => 'varchar',
-        'length' => 128,
+        'size' => 'big',
+        'type' => 'int',
         'not null' => TRUE,
         'default' => '',
       ),
@@ -1568,4 +1568,23 @@ function tripal_chado_update_7327() {
   }
 }
 
+/**
+ * Fixing the chado_bundle.type_id type.
+ */
+function tripal_chado_update_7329() {
+  try {
+    db_change_field('chado_bundle', 'type_id', 'type_id', [
+      'description' => 'If a type_column is set then this is the cvterm_id of the data type that this bundle maps to.',
+      'size' => 'big',
+      'type' => 'int',
+      'not null' => TRUE,
+      'default' => '',      
+    ]);
+  }
+  catch (\PDOException $e) {
+    $error = $e->getMessage();
+    throw new DrupalUpdateException('Could not perform update: '. $error);
+  }
+}
+