]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18910 normalised module intro and introformat
authorskodak <skodak>
Mon, 20 Apr 2009 18:59:50 +0000 (18:59 +0000)
committerskodak <skodak>
Mon, 20 Apr 2009 18:59:50 +0000 (18:59 +0000)
mod/feedback/db/upgrade.php

index ba7e0e84defe03f4520cd97426d855057ef57645..e46d9c8b77018cc7541037c57e5a895669d1f3dc 100644 (file)
@@ -270,8 +270,10 @@ function xmldb_feedback_upgrade($oldversion) {
         $table = new xmldb_table('feedback');
         $field = new xmldb_field('introformat', XMLDB_TYPE_INTEGER, '2', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'intro');
 
-    /// Launch add field introformat
-        $dbman->add_field($table, $field);
+    /// Conditionally launch add field introformat
+        if (!$dbman->field_exists($table, $field)) {
+            $dbman->add_field($table, $field);
+        }
 
     /// feedback savepoint reached
         upgrade_mod_savepoint($result, 2009042001, 'feedback');