Skip to content

Commit

Permalink
"MDL-22297, check if table field exists"
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongsheng Cai committed May 4, 2010
1 parent 7e4944c commit 3aafe5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mod/chat/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ function xmldb_chat_upgrade($oldversion) {
$field = new xmldb_field('introformat', XMLDB_TYPE_INTEGER, '4', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'intro');

/// Launch add field introformat
$dbman->add_field($table, $field);
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}

/// chat savepoint reached
upgrade_mod_savepoint($result, 2010050101, 'chat');
Expand Down

0 comments on commit 3aafe5b

Please sign in to comment.