Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple analyses per organism #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion includes/tripal_manage_analyses.fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function tripal_manage_analyses_bundle_fields_info($entity_type, $bundle)
$fields[$field_name] = [
'field_name' => $field_name,
'type' => $field_type,
'cardinality' => 1,
'cardinality' => FIELD_CARDINALITY_UNLIMITED,
'locked' => FALSE,
'storage' => [
'type' => 'field_chado_storage',
Expand Down
14 changes: 14 additions & 0 deletions tripal_manage_analyses.install
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,17 @@ function tripal_manage_analyses_update_7306() {
]);

}

/**
* Implements hook_update_n
*
* Adjusts the cardinality for the local__analysis_browser field to unlimited.
* In code, this is "FIELD_CARDINALITY_UNLIMITED", and in the database, it is represented by -1 in the cardinality column.
*/
function tripal_manage_analyses_update_7307() {
// Update the field_config table.
db_update('field_config')
->fields(array('cardinality' => -1))
->condition('field_name', 'local__analysis_browser')
->execute();
}