function tripal_views_update_6040
2.x tripal_views.install | tripal_views_update_6040() |
1.x tripal_views.install | tripal_views_update_6040() |
Tripal Views Update for 6.x-0.4
- Add priority field to tripal_views
- Add handler field to tripal_views_join
- Add tripal_views_field table to keep track of fields for views integration
Related topics
File
- tripal_views/
tripal_views.install, line 76 - Functions related to installing/uninstalling this module
Code
function tripal_views_update_6040() {
// Add Priority to tripal_views
db_add_field(
'tripal_views',
'priority',
array('type' => 'int')
);
db_add_unique_key('tripal_views', 'priority', array('table_name', 'priority'));
db_add_index('tripal_views', 'priority', array('table_name', 'priority'));
// Add handler to tripal_views_join
db_add_field(
'tripal_views_join',
'handler',
array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => ''
)
);
// Add tripal_views_field to keep track of fields for views integration
$schema = tripal_views_views_schema();
db_create_table('tripal_views_field', $schema['tripal_views_field']);
// Add base_table TRUE/FALSE to tripal_views
db_add_field(
'tripal_views',
'base_table',
array(
'type' => 'int',
'not null ' => TRUE,
'default' => 1
)
);
// Add arguments to joins
db_add_field(
'tripal_views_join',
'arguments',
array(
'description' => 'arguments that may get passed to the handler',
'type' => 'text',
'size' => 'normal'
)
);
return t('Updated Tripal Views to handle multiple Integrations and keep track of fields.');
}