summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-02-18 15:19:57 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-02-18 15:19:57 +0000
commitff9e842730ccf251cf8b76401e4df1b1c6edcea2 (patch)
tree2b10ab740305648bee997708b6d651a3816e3545 /update.php
parentdf591c8f4032041613192e1b7836725f92ea7b10 (diff)
downloadbrdo-ff9e842730ccf251cf8b76401e4df1b1c6edcea2.tar.gz
brdo-ff9e842730ccf251cf8b76401e4df1b1c6edcea2.tar.bz2
#330983 by recidive and boombatower: Rename users/users_roles tables to user/user_role for consistency.
Diffstat (limited to 'update.php')
-rw-r--r--update.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/update.php b/update.php
index 215727314..32b98ec98 100644
--- a/update.php
+++ b/update.php
@@ -588,6 +588,8 @@ function update_prepare_d7_bootstrap() {
// Allow the database system to work even though the registry has not
// been created yet.
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
+ update_prepare_d7_bootstrap_rename();
+
include_once DRUPAL_ROOT . '/includes/install.inc';
drupal_install_init_database();
spl_autoload_unregister('drupal_autoload_class');
@@ -607,6 +609,23 @@ function update_prepare_d7_bootstrap() {
}
/**
+ * Rename tables:
+ * - {users} to {user}
+ * - {users_roles} to {user_role}
+ * - {sessions} to {session}
+ */
+function update_prepare_d7_bootstrap_rename() {
+ $ret = array();
+
+ if (db_table_exists('users')) {
+ db_rename_table($ret, 'users', 'user');
+ db_rename_table($ret, 'users_roles', 'user_role');
+ }
+
+ return $ret;
+}
+
+/**
* Add the update task list to the current page.
*/
function update_task_list($active = NULL) {