function cleantalk_schema in Anti Spam by CleanTalk 8
Same name and namespace in other branches
- 8.4 cleantalk.install \cleantalk_schema()
- 8.3 cleantalk.install \cleantalk_schema()
- 7 cleantalk.install \cleantalk_schema()
- 9.1.x cleantalk.install \cleantalk_schema()
Implements hook_schema().
File
- ./
cleantalk.install, line 11 - Install and uninstall functions, schema definition for the CleanTalk module.
Code
function cleantalk_schema() {
$schema['cleantalk_timelabels'] = array(
'description' => 'Timelabels for admin notification sending.',
'fields' => array(
'ct_key' => array(
'type' => 'varchar',
'length' => 100,
'not null' => TRUE,
'default' => '',
'description' => 'Notification ID.',
),
'ct_value' => array(
'type' => 'int',
'length' => 12,
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'Time of last notification.',
),
),
'primary key' => array(
'ct_key',
),
);
$schema['cleantalk_cids'] = array(
'description' => 'Comment checking results - CIDs and server responces.',
'fields' => array(
'cid' => array(
'type' => 'int',
'length' => 12,
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'ID of checked comment.',
),
'ct_request_id' => array(
'type' => 'varchar',
'length' => 100,
'not null' => TRUE,
'default' => '',
'description' => 'CleanTalk request ID for comment.',
),
'ct_result_comment' => array(
'type' => 'varchar',
'length' => 100,
'not null' => TRUE,
'default' => '',
'description' => 'CleanTalk result for comment.',
),
),
'primary key' => array(
'cid',
),
);
$schema['cleantalk_uids'] = array(
'description' => 'New user checking results - UIDs and server responces.',
'fields' => array(
'uid' => array(
'type' => 'int',
'length' => 12,
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'ID of checked user registration.',
),
'ct_request_id' => array(
'type' => 'varchar',
'length' => 100,
'not null' => TRUE,
'default' => '',
'description' => 'CleanTalk request ID for user registration.',
),
'ct_result_comment' => array(
'type' => 'varchar',
'length' => 100,
'not null' => TRUE,
'default' => '',
'description' => 'CleanTalk result for user registration.',
),
),
'primary key' => array(
'uid',
),
);
return $schema;
}