function cleantalk_update_7301 in Anti Spam by CleanTalk 7.5
Same name and namespace in other branches
- 7.4 cleantalk.install \cleantalk_update_7301()
Compatibilty changes for SpamFireWall logs table
File
- ./
cleantalk.install, line 214 - Install and uninstall functions for the CleanTalk module.
Code
function cleantalk_update_7301(&$sandbox = NULL) {
variable_set('cleantalk_sfw_last_logs_sent', time());
db_drop_table('cleantalk_sfw_logs');
$cleantalk_sfw_logs = array(
'description' => 'Comment checking results - CIDs and server responces.',
'fields' => array(
'ip' => array(
'type' => 'varchar',
'length' => 15,
'not null' => TRUE,
'default' => '',
'description' => 'IP.',
),
'all_entries' => array(
'type' => 'int',
'description' => 'All entries.',
),
'blocked_entries' => array(
'type' => 'int',
'description' => 'Blocked entries.',
),
'entries_timestamp' => array(
'type' => 'int',
'description' => 'time().',
),
),
'primary key' => array(
'ip',
),
);
db_create_table('cleantalk_sfw_logs', $cleantalk_sfw_logs);
return '* New table for SpamFireWall logs added.';
}