diff --git a/lib/db/install.xml b/lib/db/install.xml index 7580795e357..7802f239ccd 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 b45bf473b60..efeaf328837 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -5956,6 +5956,18 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); upgrade_main_savepoint(true, 2011011415); } + if ($oldversion < 2011012500) { + //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, 2011012500); + } + return true; } diff --git a/version.php b/version.php index a4024e7a325..1d2012b0ab7 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2011011900; // YYYYMMDD = date of the last version bump +$version = 2011012500; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0.1+ (Build: 20110119)'; // Human-friendly version name