Test when updating moodle.
Update Tool_lp pluging
Check in phpmyadmin that new index was added to table mdl_tool_lp_module_competency.
Test when installing moodle.
In moodle directory rename the config.php file
Start moodle and follow the installation instruction (be careful to not overwrite you database).
Check in phpmyadmin that new index exists in table mdl_tool_lp_module_competency.
Put back you config.php file.