Browse Source

Added arguments column to tripal_views_join to handle situations where additional arguments are needed by the join handler

Lacey Sanderson 12 years ago
parent
commit
da7b699014
1 changed files with 27 additions and 10 deletions
  1. 27 10
      tripal_views/tripal_views.install

+ 27 - 10
tripal_views/tripal_views.install

@@ -18,7 +18,7 @@ function tripal_views_install() {
   // create the tables that manage materialized views and jobs
   drupal_install_schema('tripal_views');
 
-  // we want views to pick up our changes  
+  // we want views to pick up our changes
   views_invalidate_cache();
 
 }
@@ -85,6 +85,18 @@ function tripal_views_update_6040() {
   db_add_field($ret, 'tripal_views', 'base_table', array('type' => 'int', 'not null ' => TRUE,
       'default' => 1));
 
+  // Add arguments to joins
+  db_add_field(
+    $ret,
+    'tripal_views_join',
+    'arguments',
+    array(
+      'description' => 'arguments that may get passed to the handler',
+      'type' => 'text',
+      'size' => 'normal'
+    )
+  );
+
   return $ret;
 }
 
@@ -118,7 +130,7 @@ function tripal_views_views_schema() {
       ),
       'base_table' => array(
          'description' => 'either TRUE (1) or FALSE (0) depending on whether the current table should be a bast table of a View',
-         'type' => 'int', 
+         'type' => 'int',
          'not null ' => TRUE,
          'default' => 1
       ),
@@ -237,14 +249,19 @@ function tripal_views_views_schema() {
         'length' => '255',
         'not null' => TRUE,
         'default' => '',
-        ),
-        'handler' => array(
-          'description' => 'the name of the handler',
-          'type' => 'varchar',
-          'length' => '255',
-          'not null' => TRUE,
-          'default' => '',
-        ),
+      ),
+      'handler' => array(
+        'description' => 'the name of the handler',
+        'type' => 'varchar',
+        'length' => '255',
+        'not null' => TRUE,
+        'default' => '',
+      ),
+      'arguments' => array(
+        'description' => 'arguments that may get passed to the handler',
+        'type' => 'text',
+        'size' => 'normal',
+      ),
     ),
     'unique_keys' => array(
       'setup_id' => array('view_join_id'),