summaryrefslogtreecommitdiff
path: root/modules/user/user.install
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user/user.install')
-rw-r--r--modules/user/user.install34
1 files changed, 11 insertions, 23 deletions
diff --git a/modules/user/user.install b/modules/user/user.install
index 80d03de52..df4b2670d 100644
--- a/modules/user/user.install
+++ b/modules/user/user.install
@@ -41,38 +41,26 @@ function user_schema() {
'primary key' => array('aid'),
);
- $schema['permission'] = array(
- 'description' => t('Stores permissions for users.'),
+ $schema['role_permission'] = array(
+ 'description' => t('Stores the permissions assigned to user roles.'),
'fields' => array(
- 'pid' => array(
- 'type' => 'serial',
- 'not null' => TRUE,
- 'description' => t('Primary Key: Unique permission ID.'),
- ),
'rid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
- 'default' => 0,
- 'description' => t('The {role}.rid to which the permissions are assigned.'),
- ),
- 'perm' => array(
- 'type' => 'text',
- 'not null' => FALSE,
- 'size' => 'big',
- 'description' => t('List of permissions being assigned.'),
+ 'description' => t('Foreign Key: {role}.rid.'),
),
- 'tid' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
+ 'permission' => array(
+ 'type' => 'varchar',
+ 'length' => 64,
'not null' => TRUE,
- 'default' => 0,
- 'description' => t('Originally intended for taxonomy-based permissions, but never used.'),
+ 'default' => '',
+ 'description' => t('A single permission granted to the role identified by rid.'),
),
),
- 'primary key' => array('pid'),
+ 'primary key' => array('rid', 'permission'),
'indexes' => array(
- 'rid' => array('rid'),
+ 'permission' => array('permission'),
),
);
@@ -83,7 +71,7 @@ function user_schema() {
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
- 'description' => t('Primary Key: Unique role id.'),
+ 'description' => t('Primary Key: Unique role ID.'),
),
'name' => array(
'type' => 'varchar',