function block_class_update_6101 in Block Class 6
Fix too long primary key length in {block_class}.
File
- ./
block_class.install, line 68 - Provides the (un)install and update logic for block_class.
Code
function block_class_update_6101() {
$ret = array();
// Drop current primary key.
db_drop_primary_key($ret, 'block_class');
db_change_field($ret, 'block_class', 'module', 'module', array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'description' => 'The module to which the block belongs.',
));
db_change_field($ret, 'block_class', 'delta', 'delta', array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'description' => "The ID of the module's block.",
));
db_change_field($ret, 'block_class', 'css_class', 'css_class', array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'description' => 'String containing the classes for the block.',
));
// Create new primary key.
db_add_primary_key($ret, 'block_class', array(
'module',
'delta',
));
return $ret;
}