diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-27 21:07:18 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-27 21:07:18 +0000 |
commit | bd15853708ae73ee69220738a061e10d015d7fb9 (patch) | |
tree | facfbd5b08e3cbb8e7fa2b4adf433b54d4c0c5bc /modules/user/helpers/user_installer.php | |
parent | 0b9fe18a6bf4036a05db7f9479d7b55d3fe5c782 (diff) |
This implements table prefix for all the queries in core, user, exif,
tag, search, comment and notification modules (Ticket #68)
Diffstat (limited to 'modules/user/helpers/user_installer.php')
-rw-r--r-- | modules/user/helpers/user_installer.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/user/helpers/user_installer.php b/modules/user/helpers/user_installer.php index f293e109..414327f5 100644 --- a/modules/user/helpers/user_installer.php +++ b/modules/user/helpers/user_installer.php @@ -23,7 +23,7 @@ class user_installer { $version = module::get_version("user"); if ($version == 0) { - $db->query("CREATE TABLE IF NOT EXISTS `users` ( + $db->query("CREATE TABLE IF NOT EXISTS `[users]` ( `id` int(9) NOT NULL auto_increment, `name` varchar(32) NOT NULL, `full_name` varchar(255) NOT NULL, @@ -41,7 +41,7 @@ class user_installer { UNIQUE KEY(`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - $db->query("CREATE TABLE IF NOT EXISTS `groups` ( + $db->query("CREATE TABLE IF NOT EXISTS `[groups]` ( `id` int(9) NOT NULL auto_increment, `name` char(64) default NULL, `special` BOOLEAN default 0, @@ -49,7 +49,7 @@ class user_installer { UNIQUE KEY(`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - $db->query("CREATE TABLE IF NOT EXISTS `groups_users` ( + $db->query("CREATE TABLE IF NOT EXISTS `[groups_users]` ( `group_id` int(9) NOT NULL, `user_id` int(9) NOT NULL, PRIMARY KEY (`group_id`, `user_id`), @@ -105,9 +105,9 @@ class user_installer { } catch (Exception $e) { } $db = Database::instance(); - $db->query("DROP TABLE IF EXISTS `users`;"); - $db->query("DROP TABLE IF EXISTS `groups`;"); - $db->query("DROP TABLE IF EXISTS `groups_users`;"); + $db->query("DROP TABLE IF EXISTS `[users]`;"); + $db->query("DROP TABLE IF EXISTS `[groups]`;"); + $db->query("DROP TABLE IF EXISTS `[groups_users]`;"); module::delete("user"); } }
\ No newline at end of file |