Add field exist check for alignment field
This commit is contained in:
parent
311e243ca5
commit
12d8122c14
1 changed files with 4 additions and 1 deletions
|
@ -182,7 +182,10 @@ function xmldb_customcert_upgrade($oldversion) {
|
|||
$table = new xmldb_table('customcert_elements');
|
||||
$field = new xmldb_field('alignment', XMLDB_TYPE_CHAR, '1', null, XMLDB_NOTNULL, null, 'L', 'refpoint');
|
||||
|
||||
$dbman->add_field($table, $field);
|
||||
// Conditionally launch add field.
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
upgrade_mod_savepoint(true, 2021051702, 'customcert'); // Replace with the actual version number.
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue