mirror of
https://github.com/moodle/moodle.git
synced 2025-03-24 17:40:26 +01:00
MDL-78909 mod_lti: Add indexes in upgrade.php
This commit is contained in:
parent
faa491fe3b
commit
787455198b
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user