You are here

function user_expire_schema in User Expire 8

Same name and namespace in other branches
  1. 7 user_expire.install \user_expire_schema()

Implements hook_schema().

File

./user_expire.install, line 11
Install and update functions for the User expire module.

Code

function user_expire_schema() {
  $schema['user_expire'] = [
    'description' => 'The tracking table for user expirations.',
    'fields' => [
      'uid' => [
        'description' => 'The primary identifier for a user.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'expiration' => [
        'description' => 'The Unix timestamp when the user will be disabled.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'foreign keys' => [
      'uid' => [
        'table' => 'users_field_data',
        'columns' => [
          'uid' => 'uid',
        ],
      ],
    ],
    'primary key' => [
      'uid',
    ],
  ];
  return $schema;
}