Commit 2b5b8da7 authored by Aaron Wells's avatar Aaron Wells
Browse files

Increase the size of the Leap2a entrycontent column (Bug 1474659)

In MySQL, the default "text" column size is 65kB. Because this column
can hold the serialized text from several other columns, it needs to
be larger than that. Setting it to "big" generates a "longtext", which
is 4GB.

This change has no effect in Postgres. Postgres has only one text
size (unlimited). The XMLDB generator is smart enough that it
recognizes this and doesn't run any SQL in this case.

Change-Id: Ic26f0eb3d3c3181fdcaf8729373ca87b6ecc9c8d
parent 2d5e46e3
......@@ -1030,7 +1030,7 @@
<FIELD NAME="plugin" TYPE="char" LENGTH="255" NOTNULL="true" />
<FIELD NAME="entrytype" TYPE="char" LENGTH="255" NOTNULL="true" />
<FIELD NAME="entrytitle" TYPE="text" NOTNULL="true" />
<FIELD NAME="entrycontent" TYPE="text" NOTNULL="false" />
<FIELD NAME="entrycontent" TYPE="text" LENGTH="big" NOTNULL="false" />
<FIELD NAME="duplicateditemids" TYPE="text" NOTNULL="false" />
<FIELD NAME="existingitemids" TYPE="text" NOTNULL="false" />
<FIELD NAME="artefactmapping" TYPE="text" NOTNULL="false" />
......
......@@ -4073,5 +4073,14 @@ function xmldb_core_upgrade($oldversion=0) {
@unlink(get_config('dataroot') . 'dwoo/compile/default' . get_config('docroot') . 'theme/raw/' . 'templates/admin/users/accesslistitem.tpl.d'.Dwoo_Core::RELEASE_TAG.'.php');
}
if ($oldversion < 2015071500) {
log_debug('Expanding the size of the import_entry_requests.entrycontent column');
$table = new XMLDBTable('import_entry_requests');
$field = new XMLDBField('entrycontent');
$field->setType(XMLDB_TYPE_TEXT);
$field->setLength('big');
change_field_precision($table, $field);
}
return $status;
}
......@@ -16,7 +16,7 @@ $config = new stdClass();
// See https://wiki.mahara.org/index.php/Developer_Area/Version_Numbering_Policy
// For upgrades on stable branches, increment the version by one. On master, use the date.
$config->version = 2015042800;
$config->version = 2015071500;
$config->series = '15.10';
$config->release = '15.10dev';
$config->minupgradefrom = 2009022600;
......
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