Skip to content

Commit

Permalink
MDL-56292 core: change size of 'component' DB column
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwyllie authored and mdjnelson committed Oct 11, 2016
1 parent a92eda4 commit f8e4145
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/db/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="timeuserfromdeleted" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="timeusertodeleted" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="component" TYPE="char" LENGTH="200" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="component" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="eventtype" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false"/>
</FIELDS>
<KEYS>
Expand Down Expand Up @@ -565,7 +565,7 @@
<FIELD NAME="timeread" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="timeuserfromdeleted" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="timeusertodeleted" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="component" TYPE="char" LENGTH="200" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="component" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="eventtype" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false"/>
</FIELDS>
<KEYS>
Expand Down
13 changes: 9 additions & 4 deletions lib/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2228,10 +2228,10 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2016100501.00);
}

if ($oldversion < 2016100700.01) {
if ($oldversion < 2016101000.00) {
// Define field component to be added to message.
$table = new xmldb_table('message');
$field = new xmldb_field('component', XMLDB_TYPE_CHAR, '200', null, null, null, null, 'timeusertodeleted');
$field = new xmldb_field('component', XMLDB_TYPE_CHAR, '100', null, null, null, null, 'timeusertodeleted');

// Conditionally launch add field component.
if (!$dbman->field_exists($table, $field)) {
Expand All @@ -2246,9 +2246,14 @@ function xmldb_main_upgrade($oldversion) {
$dbman->add_field($table, $field);
}

// Main savepoint reached.
upgrade_main_savepoint(true, 2016101000.00);
}

if ($oldversion < 2016101000.01) {
// Define field component to be added to message_read.
$table = new xmldb_table('message_read');
$field = new xmldb_field('component', XMLDB_TYPE_CHAR, '200', null, null, null, null, 'timeusertodeleted');
$field = new xmldb_field('component', XMLDB_TYPE_CHAR, '100', null, null, null, null, 'timeusertodeleted');

// Conditionally launch add field component.
if (!$dbman->field_exists($table, $field)) {
Expand All @@ -2264,7 +2269,7 @@ function xmldb_main_upgrade($oldversion) {
}

// Main savepoint reached.
upgrade_main_savepoint(true, 2016100700.01);
upgrade_main_savepoint(true, 2016101000.01);
}

return true;
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@

defined('MOODLE_INTERNAL') || die();

$version = 2016100700.01; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2016101000.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.

$release = '3.2dev (Build: 20161007)'; // Human-friendly version name
$release = '3.2dev (Build: 20161010)'; // Human-friendly version name

$branch = '32'; // This version's branch.
$maturity = MATURITY_ALPHA; // This version's maturity level.

0 comments on commit f8e4145

Please sign in to comment.