function subuser_schema in Subuser 6
Implementation of hook_schema().
File
- ./
subuser.install, line 12 - Provides database schema and uninstall cleanup.
Code
function subuser_schema() {
$schema['subuser_relationship'] = array(
'description' => t('Holds user relationship associations.'),
'fields' => array(
'rid' => array(
'type' => 'serial',
'description' => t('The unique relationship identifier.'),
'unsigned' => TRUE,
'not null' => TRUE,
),
'parent_id' => array(
'description' => t('The parent user identifier.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'uid' => array(
'description' => t('The primary user identifier.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'indexes' => array(
'uid' => array(
'uid',
),
'parent_id' => array(
'parent_id',
),
),
'primary key' => array(
'rid',
),
);
$schema['subuser_limit'] = array(
'description' => t('Holds per parent user limits on the number of subusers they can create.'),
'fields' => array(
'uid' => array(
'type' => 'int',
'description' => t('The uid of the parent.'),
'unsigned' => TRUE,
'not null' => TRUE,
),
'subuser_limit' => array(
'type' => 'int',
'description' => t('The limit on the number of subusers this parent is allowed to create.'),
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'indexes' => array(
'uid' => array(
'uid',
),
),
'primary key' => array(
'uid',
),
);
return $schema;
}