Commit 70e006e2 authored by Lea's avatar Lea
Browse files

Merge version

parents 68850bf9 600fe966
<?php
function xmldb_block_career_upgrade($oldversion) {
global $DB;
$dbman = $DB->get_manager();
if ($oldversion < 2021070101) {
// Define table block_career_groups to be created.
$table = new xmldb_table('block_career_groups');
// Adding fields to table block_career_groups.
$table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('group_id', XMLDB_TYPE_INTEGER, '8', null, XMLDB_NOTNULL, null, '0');
$table->add_field('career', XMLDB_TYPE_INTEGER, '8', null, XMLDB_NOTNULL, null, '0');
$table->add_field('timeadded', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
// Adding keys to table block_career_groups.
$table->add_key('primary', XMLDB_KEY_PRIMARY, ['id']);
$table->add_key('career', XMLDB_KEY_FOREIGN, ['career'], 'block_career', ['id']);
$table->add_key('group_id', XMLDB_KEY_FOREIGN, ['group_id'], 'groups', ['id']);
// Conditionally launch create table for block_career_groups.
if (!$dbman->table_exists($table)) {
$dbman->create_table($table);
}
// Career savepoint reached.
upgrade_block_savepoint(true, 2021070101, 'career');
}
return true;
}
?>
......@@ -27,8 +27,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2021070500;
$plugin->requires = 2014051200;
$plugin->component = 'block_career';
$plugin->release = 'v1.1';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment