MDL-62478 upgrade: add 3.5.0 separation line to all upgrade scripts
[moodle.git] / question / type / numerical / db / upgrade.php
blob0f5b5eb1559a282a3f627a3e9a1decf6d7233cb5
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
17 /**
18 * Numerical question type upgrade code.
20 * @package qtype
21 * @subpackage numerical
22 * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26 defined('MOODLE_INTERNAL') || die();
28 /**
29 * Upgrade code for the numerical question type.
30 * @param int $oldversion the version we are upgrading from.
32 function xmldb_qtype_numerical_upgrade($oldversion) {
33 global $CFG, $DB;
34 $dbman = $DB->get_manager();
36 if ($oldversion < 2017121000) {
38 // Changing length of field multiplier on table question_numerical_units to 38.
39 $table = new xmldb_table('question_numerical_units');
40 $field = new xmldb_field('multiplier', XMLDB_TYPE_NUMBER, '38, 19', null, XMLDB_NOTNULL, null, '1.00000000000000000000');
42 // Launch change of length for field multiplier.
43 $dbman->change_field_type($table, $field);
45 // Data savepoint reached.
46 upgrade_plugin_savepoint(true, 2017121000, 'qtype', 'numerical');
49 // Automatically generated Moodle v3.2.0 release upgrade line.
50 // Put any upgrade step following this.
52 // Automatically generated Moodle v3.3.0 release upgrade line.
53 // Put any upgrade step following this.
55 // Automatically generated Moodle v3.4.0 release upgrade line.
56 // Put any upgrade step following this.
58 // Automatically generated Moodle v3.5.0 release upgrade line.
59 // Put any upgrade step following this.
61 return true;