From 058cac7b020c1fff4985cf92316c40002d4e5fe9 Mon Sep 17 00:00:00 2001
From: alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>
Date: Wed, 6 Oct 2010 13:00:12 +0000
Subject: - Add unique index on users.username+users.mail_host

git-svn-id: https://svn.roundcube.net/trunk@4053 208e9e7b-5314-0410-a742-e7e81cd9613c
---
 roundcubemail/SQL/mysql.update.sql | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'roundcubemail/SQL/mysql.update.sql')

diff --git a/roundcubemail/SQL/mysql.update.sql b/roundcubemail/SQL/mysql.update.sql
index 28ebf6f49..b9ab59ea9 100644
--- a/roundcubemail/SQL/mysql.update.sql
+++ b/roundcubemail/SQL/mysql.update.sql
@@ -123,3 +123,9 @@ CREATE TABLE `contactgroupmembers` (
 
 ALTER TABLE `users` CHANGE `last_login` `last_login` datetime DEFAULT NULL;
 UPDATE `users` SET `last_login` = NULL WHERE `last_login` = '1000-01-01 00:00:00';
+
+-- Updates from version 0.4.2
+
+ALTER TABLE `users` DROP INDEX `username_index`;
+ALTER TABLE `users` ADD UNIQUE `username` (`username`, `mail_host`);
+
-- 
cgit v1.2.3

