function spam_update_6001 in Spam 6
Allow for non-integer spam IDs
File
- ./
spam.install, line 129 - Defines Spam module schema.
Code
function spam_update_6001() {
$ret = array();
db_drop_unique_key($ret, 'spam_tracker', 'content_id_content_type');
db_change_field($ret, 'spam_tracker', 'content_id', 'content_id', array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
), array(
'unique keys' => array(
'content_id_content_type' => array(
'content_id',
'content_type',
),
),
));
db_drop_index($ret, 'spam_log', 'content_type_content_id');
db_change_field($ret, 'spam_log', 'content_id', 'content_id', array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
), array(
'indexes' => array(
'content_type_content_id' => array(
'content_type',
'content_id',
),
),
));
db_drop_index($ret, 'spam_filters_errors', 'id_type');
db_change_field($ret, 'spam_filters_errors', 'content_id', 'content_id', array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
), array(
'indexes' => array(
'id_type' => array(
'content_id',
'content_type',
),
),
));
return $ret;
}