From 0f5fa169b131c0cf4116c9b293e65f4a145c705f Mon Sep 17 00:00:00 2001 From: David Monllao Date: Mon, 14 Aug 2017 15:13:16 +0200 Subject: [PATCH] MDL-59265 analytics: Switch prediction field to float For future regression support --- lib/db/install.xml | 4 ++-- lib/db/upgrade.php | 13 +++++++++++++ version.php | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index 399b6130dc0..12b42bedd55 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -3612,7 +3612,7 @@ - + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index fcc7154e394..50c6c87e273 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2369,5 +2369,18 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2017082300.01); } + if ($oldversion < 2017082300.02) { + + // Changing type of field prediction on table analytics_predictions to number. + $table = new xmldb_table('analytics_predictions'); + $field = new xmldb_field('prediction', XMLDB_TYPE_NUMBER, '10, 2', null, XMLDB_NOTNULL, null, null, 'rangeindex'); + + // Launch change of type for field prediction. + $dbman->change_field_type($table, $field); + + // Main savepoint reached. + upgrade_main_savepoint(true, 2017082300.02); + } + return true; } diff --git a/version.php b/version.php index fa899055d9f..e0e8c07b731 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2017082400.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2017082300.02; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes.