Commit 235da74e authored by Mark Nelson's avatar Mark Nelson
Browse files

MDL-59106 core: added fields to 'analytics_predictions' table

parent c7fecfe0
......@@ -3618,6 +3618,8 @@
<FIELD NAME="predictionscore" TYPE="number" LENGTH="10" NOTNULL="true" SEQUENCE="false" DECIMALS="5"/>
<FIELD NAME="calculations" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="timestart" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="timeend" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
......
......@@ -2601,5 +2601,27 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2017092900.00);
}
if ($oldversion < 2017100601.00) {
// Define field 'timestart' to be added to 'analytics_predictions'.
$table = new xmldb_table('analytics_predictions');
$field = new xmldb_field('timestart', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'timecreated');
// Conditionally launch add field 'timestart'.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Define field 'timeend' to be added to 'analytics_predictions'.
$field = new xmldb_field('timeend', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'timestart');
// Conditionally launch add field 'timeend'.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2017100601.00);
}
return true;
}
......@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2017100600.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2017100601.00; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
......
Supports Markdown
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