function captcha_questions_dblog_schema in Captcha Questions 7
Same name and namespace in other branches
- 8 captcha_questions_dblog/captcha_questions_dblog.install \captcha_questions_dblog_schema()
Implements hook_schema().
File
- captcha_questions_dblog/
captcha_questions_dblog.install, line 10 - Install and uninstall functions for the Captcha questions dblog module.
Code
function captcha_questions_dblog_schema() {
$schema['captcha_questions_dblog'] = array(
'description' => 'Stores failed form submissions.',
'fields' => array(
'dblogid' => array(
'description' => 'Primary Key: unique ID for failed form submissions.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'timestamp' => array(
'description' => 'A Unix timestamp indicating when the submit failed.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'ip' => array(
'description' => 'IP address',
'type' => 'varchar',
'length' => 40,
'not null' => TRUE,
'default' => '',
),
'form_id' => array(
'description' => 'The form_id of the form',
'type' => 'varchar',
'length' => 40,
'not null' => TRUE,
'default' => '',
),
'question_asked' => array(
'description' => 'The question the form submit failed on',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'answer_given' => array(
'description' => 'The answer that was wrong',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'answer_correct' => array(
'description' => 'The correct answer',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
),
'indexes' => array(
'dblogid' => array(
'dblogid',
),
'timestamp' => array(
'timestamp',
),
),
);
return $schema;
}