You could change that database column and let other modules know about those changes with hook_schema_alter()
, but this could cause problems with existing modules. If you are going through this, be sure to test it on the development site, before doing the same changes on the live site. In particular, be sure the code you are using doesn't conflict with another module that alters the same column; in that eventuality, you need to accordingly change your code.
To make that field larger, it's sufficient to run the following code, for example when installing a custom module.
function mymodule_install() {
if (db_field_exists('locales_target', 'translation')) {
$field = array(
'type' => 'text',
'mysql_type' => 'blob',
'size' => 'big',
'not null' => TRUE,
'description' => 'Translation string value in this language.',
);
db_change_field('locales_target', 'translation', $field);
}
}
The following hook implementation would make the other modules aware of the column changes.
function mymodule_schema_alter(&$schema) {
if (isset($schema['locales_target']['translation'])) {
$schema['locales_target']['translation'] = array(
'type' => 'text',
'mysql_type' => 'blob',
'size' => 'big',
'not null' => TRUE,
'description' => 'Translation string value in this language.',
);
}
}
It's necessary to use a module since, without implementing hook_schema_alter()
, other modules won't know the database column has been changed.