mirror of
https://github.com/moodle/moodle.git
synced 2025-04-23 09:23:09 +02:00
workshop: adding field 'published' into the upgrade script
This commit is contained in:
parent
83012c0c89
commit
f2443a42aa
@ -109,5 +109,21 @@ function xmldb_workshop_upgrade($oldversion) {
|
||||
upgrade_mod_savepoint($result, 2009102903, 'workshop');
|
||||
}
|
||||
|
||||
/**
|
||||
* End of migration from 1.9
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add 'published' field into workshop_submissions
|
||||
*/
|
||||
if ($result && $oldversion < 2009121800) {
|
||||
$table = new xmldb_table('workshop_submissions');
|
||||
$field = new xmldb_field('published', XMLDB_TYPE_INTEGER, '2', XMLDB_UNSIGNED, null, null, '0', 'timegraded');
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
upgrade_mod_savepoint($result, 2009121800, 'workshop');
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user