diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-10-24 01:46:13 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-10-24 01:46:13 +0000 |
commit | ae70677b3d4100fd585e11f677cf27e79610ae43 (patch) | |
tree | 6e5b1dbd8ce841b317a1c8ae4b2411bdc4b3ff4e | |
parent | 63ac367e4f2a7e5ca0c46a740033841806543cc9 (diff) | |
download | brdo-ae70677b3d4100fd585e11f677cf27e79610ae43.tar.gz brdo-ae70677b3d4100fd585e11f677cf27e79610ae43.tar.bz2 |
#524710 by catch and gordon: Add role_permission() table earlier in order to allow upgrade path to work.
-rw-r--r-- | includes/update.inc | 24 | ||||
-rw-r--r-- | modules/system/system.install | 22 |
2 files changed, 23 insertions, 23 deletions
diff --git a/includes/update.inc b/includes/update.inc index f8c731e6d..283cc4bf1 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -128,10 +128,32 @@ function update_fix_d7_requirements() { $schema['cache_path']['description'] = 'Cache table used for path alias lookups.'; // system_update_7042() renames columns, but these are needed to bootstrap. - // add empty columns for now. + // Add empty columns for now. db_add_field('url_alias', 'source', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '')); db_add_field('url_alias', 'alias', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '')); + // Add the role_permisson table. + $schema['role_permission'] = array( + 'fields' => array( + 'rid' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + ), + 'permission' => array( + 'type' => 'varchar', + 'length' => 64, + 'not null' => TRUE, + 'default' => '', + ), + ), + 'primary key' => array('rid', 'permission'), + 'indexes' => array( + 'permission' => array('permission'), + ), + ); + db_create_table('role_permission', $schema['role_permission']); + // Add column for locale context. if (db_table_exists('locales_source')) { db_add_field('locales_source', 'context', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', 'description' => 'The context this string applies to.')); diff --git a/modules/system/system.install b/modules/system/system.install index 663d67b76..9fbc8ffee 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -1992,28 +1992,6 @@ function system_update_7006() { * all modules can use the updated permission scheme during their updates. */ function system_update_7007() { - $schema['role_permission'] = array( - 'fields' => array( - 'rid' => array( - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - ), - 'permission' => array( - 'type' => 'varchar', - 'length' => 64, - 'not null' => TRUE, - 'default' => '', - ), - ), - 'primary key' => array('rid', 'permission'), - 'indexes' => array( - 'permission' => array('permission'), - ), - ); - - db_create_table('role_permission', $schema['role_permission']); - // Copy the permissions from the old {permission} table to the new {role_permission} table. $messages = array(); $result = db_query("SELECT rid, perm FROM {permission} ORDER BY rid ASC"); |