MDL-20306 Add course_category idnumber field: version bump and fix missing add_field...
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 10 Oct 2011 21:34:27 +0000 (23:34 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 10 Oct 2011 21:54:40 +0000 (23:54 +0200)
lib/db/upgrade.php
version.php

index 03db374..ad4056b 100644 (file)
@@ -6778,16 +6778,18 @@ FROM
         upgrade_main_savepoint(true, 2011092800.03);
     }
 
-    if ($oldversion < 2011100700.01) {
+    if ($oldversion < 2011100700.02) {
         // Define field idnumber to be added to course_categories
         $table = new xmldb_table('course_categories');
         $field = new xmldb_field('idnumber', XMLDB_TYPE_CHAR, '100', null, null, null, null, 'name');
 
         // Conditionally launch add field idnumber
         if (!$dbman->field_exists($table,$field)) {
+            $dbman->add_field($table, $field);
+        }
 
         // Main savepoint reached
-        upgrade_main_savepoint(true, 2011100700.01);
+        upgrade_main_savepoint(true, 2011100700.02);
     }
 
     return true;
index f9757d8..75de414 100644 (file)
@@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die();
 
 
 
-$version  = 2011100700.01;              // YYYYMMDD      = weekly release date of this DEV branch
+$version  = 2011100700.02;              // YYYYMMDD      = weekly release date of this DEV branch
                                         //         RR    = release increments - 00 in DEV branches
                                         //           .XX = incremental changes