Hello,
I'm upgrading Moodle site from 2.2 to 2.6 version.
The upgrade was stuck for 48 hours while changing course_sections index to unique index.
The change performed in this file: lib/db/upgrade.php in the "if ($oldversion < 2012042300.00) {" section.
The code does the following operations:
- Drop the existing ununique index for 'course - section'.
- Query to find duplicate entries for 'course - section'.
- Delete the duplicates found.
- Create new unique index for 'course - section'.
The upgrade was stuck with the second point.
When I run the same query before the index droped it took several seconds.
I wonder if the query shouldn't have to run when the index is still existing - and drop the index only before creating the new one.
Is there any problem with my suggestion?
Thank you in advance,
Meir