function cleantalk_update_7300 in Anti Spam by CleanTalk 7.5
Same name and namespace in other branches
- 7.4 cleantalk.install \cleantalk_update_7300()
Add new table for SpamFireWall logs
File
- ./
cleantalk.install, line 178 - Install and uninstall functions for the CleanTalk module.
Code
function cleantalk_update_7300(&$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' => array(
'type' => 'int',
'description' => 'All entries.',
),
'blocked' => array(
'type' => 'int',
'description' => 'Blocked 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.';
}