mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Merge branch 'MDL-31973-master-6' of git://git.luns.net.uk/moodle
Conflicts: lib/db/upgrade.php
This commit is contained in:
commit
238f7761af
14 changed files with 161 additions and 7 deletions
|
@ -1162,6 +1162,27 @@ function xmldb_main_upgrade($oldversion) {
|
|||
upgrade_main_savepoint(true, 2012082300.01);
|
||||
}
|
||||
|
||||
if ($oldversion < 2012082300.02) {
|
||||
// Define field component to be added to groups_members
|
||||
$table = new xmldb_table('groups_members');
|
||||
$field = new xmldb_field('component', XMLDB_TYPE_CHAR, '100', null, XMLDB_NOTNULL, null, null, 'timeadded');
|
||||
|
||||
// Conditionally launch add field component
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
// Define field itemid to be added to groups_members
|
||||
$field = new xmldb_field('itemid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'component');
|
||||
|
||||
// Conditionally launch add field itemid
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
// Main savepoint reached
|
||||
upgrade_main_savepoint(true, 2012082300.02);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue