Browse Source

Added featureloc table description

laceysanderson 14 years ago
parent
commit
22c8d23a9c
1 changed files with 31 additions and 0 deletions
  1. 31 0
      tripal_feature/tripal_feature.api.inc

+ 31 - 0
tripal_feature/tripal_feature.api.inc

@@ -95,3 +95,34 @@ function tripal_feature_chado_featureprop_schema() {
 
   return $description;
 }
+
+/**
+ * Implements hook_chado_featureloc_schema()
+ * Purpose: To add descriptions and foreign keys to default table description
+ * Note: This array will be merged with the array from all other implementations
+ *
+ * @return
+ *    Array describing the featureloc table
+ *
+ * @ingroup tripal_feature
+ */
+function tripal_feature_chado_featureloc_schema() {
+  $description = array();
+
+  // Default table description in tripal_core.schema.api.inc: tripal_core_chado_featureloc_schema()
+
+  $description['foreign keys']['feature'] = array(
+        'table' => 'feature',
+        'columns' => array(
+          'feature_id' => 'feature_id',
+          'srcfeature_id' => 'feature_id'
+        ),
+  );
+  
+  $referring_tables = array('analysisfeature',
+    'featureloc_pub',
+  );
+  $description['referring_tables'] = $referring_tables;
+
+  return $description;
+}