mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-36614 calendar: upgrade code for adding eventtype field to all existing installs
This commit is contained in:
parent
35ad5fc6bb
commit
20131e5cdd
@ -1472,6 +1472,20 @@ function xmldb_main_upgrade($oldversion) {
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2012111200.01);
|
||||
}
|
||||
if ($oldversion < 2012111601.01) {
|
||||
|
||||
// Define field eventtype to be added to event_subscriptions.
|
||||
$table = new xmldb_table('event_subscriptions');
|
||||
$field = new xmldb_field('eventtype', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, 'userid');
|
||||
|
||||
// Conditionally launch add field eventtype.
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2012111601.01);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
|
@ -30,7 +30,7 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
$version = 2012111601.00; // YYYYMMDD = weekly release date of this DEV branch
|
||||
$version = 2012111601.01; // YYYYMMDD = weekly release date of this DEV branch
|
||||
// RR = release increments - 00 in DEV branches
|
||||
// .XX = incremental changes
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user