Skip to content
Snippets Groups Projects
Commit 2fefa7a7 authored by Earl Miles's avatar Earl Miles
Browse files

Fix major bug with too-long page names. Thanks drewish!

parent d82866d6
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,19 @@ function ctools_uninstall() {
function ctools_schema() {
// Currently, schema 1 is the only schema we have. As we make updates,
// we might either create a new schema 2 or make adjustments here.
return ctools_schema_1();
return ctools_schema_2();
}
/**
* Version 2 of the CTools schema.
*/
function ctools_schema_2() {
$schema = ctools_schema_1();
// update the 'name' field to be 128 bytes long:
$schema['ctools_object_cache']['fields']['name']['length'] = 128;
return $schema;
}
/**
......@@ -71,3 +83,18 @@ function ctools_schema_1() {
);
return $schema;
}
/**
* Enlarge the ctools_object_cache.name column to prevent truncation and weird
* errors.
*/
function ctools_update_6001() {
$ret = array();
// Perform updates like this to reduce code duplication.
$schema = ctools_schema_2();
db_change_field($ret, 'ctools_object_cache', 'name', 'name', $schema['ctools_object_cache']['fields']['name']);
return $ret;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment