function role_expire_schema in Role Expire 6
Same name and namespace in other branches
- 8 role_expire.install \role_expire_schema()
- 7 role_expire.install \role_expire_schema()
- 2.x role_expire.install \role_expire_schema()
Implementation of hook_schema().
File
- ./
role_expire.install, line 13 - Role expire install.
Code
function role_expire_schema() {
$schema['role_expire'] = array(
'description' => 'Expiration time for the user roles.',
'fields' => array(
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'User ID connected with expiration time.',
),
'rid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'The role ID assigned to the user.',
),
'expiry_timestamp' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'Role expiration timestamp.',
),
),
'primary key' => array(
'uid',
'rid',
),
);
$schema['role_expire_length'] = array(
'description' => 'Length in days to assign each role by default.',
'fields' => array(
'rid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'The role_id.',
),
'duration' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'The default duration for the role.',
),
),
'primary key' => array(
'rid',
),
);
return $schema;
}