diff --git a/lib/db/install.xml b/lib/db/install.xml index 8d63338847c..2088df6a251 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -1246,6 +1246,9 @@ + + + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 05c644f4fcc..ca4b77525b8 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -5993,6 +5993,18 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); upgrade_main_savepoint(true, 2011012500); } + if ($oldversion < 2011012501) { + //add the index userfieldidx (not unique) to user_info_data + $table = new xmldb_table('user_info_data'); + $index = new xmldb_index('userfieldidx', XMLDB_INDEX_NOTUNIQUE, array('userid', 'fieldid')); + + if (!$dbman->index_exists($table, $index)) { + $dbman->add_index($table, $index); + } + + upgrade_main_savepoint(true, 2011012501); + } + return true; } diff --git a/version.php b/version.php index 242ee1285c1..426e861e22c 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2011012500; // YYYYMMDD = date of the last version bump +$version = 2011012501; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0.1+ (Build: 20110125)'; // Human-friendly version name