function user_email_verification_schema in User email verification 8
Same name and namespace in other branches
- 7 user_email_verification.install \user_email_verification_schema()
Implements hook_schema().
File
- ./
user_email_verification.install, line 40 - The module installation functions.
Code
function user_email_verification_schema() {
$schema['user_email_verification'] = [
'description' => 'The base table for email verification for specific user.',
'fields' => [
'uid' => [
'description' => 'The user id from users table.',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
'default' => 0,
],
'verified' => [
'description' => 'Email verified timestamp & flag.',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
'default' => 0,
],
'last_reminder' => [
'type' => 'int',
'description' => 'Last notification timestamp.',
'not null' => TRUE,
'unsigned' => TRUE,
'default' => 0,
],
'reminders' => [
'type' => 'int',
'description' => 'Number of reminders sent.',
'not null' => TRUE,
'unsigned' => TRUE,
'default' => 0,
],
],
'indexes' => [
'inx_uid' => [
'uid',
],
'inx_verified' => [
'verified',
],
'inx_last_reminder' => [
'last_reminder',
],
],
'primary key' => [
'uid',
],
];
return $schema;
}