MDL-48716 webservices: New ws core_user_remove_user_device
[moodle.git] / lib / db / upgrade.php
index 2b03cf6..522656a 100644 (file)
@@ -4177,5 +4177,14 @@ function xmldb_main_upgrade($oldversion) {
         upgrade_main_savepoint(true, 2015021100.00);
     }
 
+    if ($oldversion < 2015021900.01) {
+        $table = new xmldb_table('user_devices');
+        $index = new xmldb_index('uuid-userid', XMLDB_INDEX_NOTUNIQUE, array('uuid', 'userid'));
+        if (!$dbman->index_exists($table, $index)) {
+            $dbman->add_index($table, $index);
+        }
+        upgrade_main_savepoint(true, 2015021900.01);
+    }
+
     return true;
 }