Skip to content

Commit

Permalink
Merge pull request #1225 from tripal/fix-1218
Browse files Browse the repository at this point in the history
#1218 add the mview  db2cv_mview on chado install
  • Loading branch information
spficklin committed Sep 27, 2021
2 parents 83f11e4 + ab1bdf0 commit 48cd174
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions tripal_chado/tripal_chado.install
Original file line number Diff line number Diff line change
Expand Up @@ -732,16 +732,20 @@ function tripal_chado_fix_legacy_SOFP_7338() {
chado_update_record('cvterm', ['cvterm_id' => $id], ['is_relationshiptype' => 0]);
}

// Repopulate the mview.
$mview_id = chado_get_mview_id('db2cv_mview');
global $user;
tripal_add_job(
'Repopulating db2cv to fix legacy SOFP',
'tripal_chado',
'chado_populate_mview',
[$mview_id],
$user->uid
);
// Repopulate the mview if the table exists. This is only the case during
// an upgrade from Tripal v2. Otherwise the db2cv_mview gets created
// during the prepare Chado stage of the install and is not needed here.
if (chado_table_exists('db2cv_mview')) {
$mview_id = chado_get_mview_id('db2cv_mview');
global $user;
tripal_add_job(
'Repopulating db2cv to fix legacy SOFP',
'tripal_chado',
'chado_populate_mview',
[$mview_id],
$user->uid
);
}
}

/**
Expand Down

0 comments on commit 48cd174

Please sign in to comment.