]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15498: Completion fix: core upgrade broken
authorsam_marshall <sam_marshall>
Mon, 28 Jul 2008 17:26:57 +0000 (17:26 +0000)
committersam_marshall <sam_marshall>
Mon, 28 Jul 2008 17:26:57 +0000 (17:26 +0000)
lib/db/upgrade.php

index 0c4613e283886a0783c43414fc7b8ee9b9eeb08a..c5911461f714f9461c6a3f22b84ad8fbd1989c5f 100644 (file)
@@ -401,19 +401,19 @@ function xmldb_main_upgrade($oldversion=0) {
         if(!$dbman->table_exists($table)) {
 
         /// Adding fields to table course_modules_completion
-            $table->addFieldInfo('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null, null, null);
-            $table->addFieldInfo('coursemoduleid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null);
-            $table->addFieldInfo('userid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null);
-            $table->addFieldInfo('completionstate', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null);
-            $table->addFieldInfo('viewed', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, null, null, null, null, null);
-            $table->addFieldInfo('timemodified', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null);
+            $table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null, null, null);
+            $table->add_field('coursemoduleid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null);
+            $table->add_field('userid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null);
+            $table->add_field('completionstate', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null);
+            $table->add_field('viewed', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, null, null, null, null, null);
+            $table->add_field('timemodified', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null);
     
         /// Adding keys to table course_modules_completion
-            $table->addKeyInfo('primary', XMLDB_KEY_PRIMARY, array('id'));
+            $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
     
         /// Adding indexes to table course_modules_completion
-            $table->addIndexInfo('coursemoduleid', XMLDB_INDEX_NOTUNIQUE, array('coursemoduleid'));
-            $table->addIndexInfo('userid', XMLDB_INDEX_NOTUNIQUE, array('userid'));
+            $table->add_index('coursemoduleid', XMLDB_INDEX_NOTUNIQUE, array('coursemoduleid'));
+            $table->add_index('userid', XMLDB_INDEX_NOTUNIQUE, array('userid'));
     
         /// Launch create table for course_modules_completion
             $dbman->create_table($table);