Skip to content

Commit

Permalink
MDL-78909 mod_lti: Add indexes in upgrade.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyatregubov authored and snake committed Sep 11, 2023
1 parent faa491f commit 7874551
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mod/lti/db/upgrade.php
Expand Up @@ -150,6 +150,11 @@ function xmldb_lti_upgrade($oldversion) {
// Add key.
$table->add_key('primary', XMLDB_KEY_PRIMARY, ['id']);

// Define index courseid (not unique) to be added to lti_coursevisible.
$table->add_index('courseid', XMLDB_INDEX_NOTUNIQUE, ['courseid']);
// Define index typeid (not unique) to be added to lti_coursevisible.
$table->add_index('typeid', XMLDB_INDEX_NOTUNIQUE, ['typeid']);

// Conditionally launch create table for overriding coursevisible.
if (!$dbman->table_exists($table)) {
$dbman->create_table($table);
Expand Down

0 comments on commit 7874551

Please sign in to comment.