Permalink
Browse files

Merge branch 'MDL-17201_index_19' of git://github.com/andyjdavis/mood…

…le into MOODLE_19_STABLE
  • Loading branch information...
2 parents d9fe1c6 + 73c07a1 commit b178d86aab96ce640f883b1c2a063c6069f2ad8d @stronk7 stronk7 committed Jan 31, 2011
Showing with 21 additions and 1 deletion.
  1. +3 −0 lib/db/install.xml
  2. +17 −0 lib/db/upgrade.php
  3. +1 −1 version.php
View
@@ -933,6 +933,9 @@
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
+ <INDEXES>
+ <INDEX NAME="userfieldidx" UNIQUE="false" FIELDS="userid, fieldid"/>
+ </INDEXES>
</TABLE>
<TABLE NAME="mnet_enrol_course" COMMENT="Information about courses on remote hosts" PREVIOUS="user_info_data" NEXT="mnet_enrol_assignments">
<FIELDS>
View
@@ -3351,6 +3351,23 @@ function xmldb_main_upgrade($oldversion=0) {
set_config('filter_mediaplugin_enable_ogg', 1);
upgrade_main_savepoint($result, 2007101590.01);
}
+
+ if ($result && $oldversion < 2007101591.01) {
+
+ /// Define index userfieldidx (not unique) to be added to user_info_data
+ $table = new XMLDBTable('user_info_data');
+ $index = new XMLDBIndex('userfieldidx');
+ $index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('userid', 'fieldid'));
+
+ /// Launch add index userfieldidx
+ if (!index_exists($table, $index)) {
+ $result = $result && add_index($table, $index);
+ }
+
+ /// Main savepoint reached
+ upgrade_main_savepoint($result, 2007101591.01);
+ }
+
return $result;
}
View
@@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2007101591.00; // YYYYMMDD = date of the 1.9 branch (don't change)
+ $version = 2007101591.01; // YYYYMMDD = date of the 1.9 branch (don't change)
// X = release number 1.9.[0,1,2,3,4,5...]
// Y.YY = micro-increments between releases

0 comments on commit b178d86

Please sign in to comment.