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/sqlite.update.sql | 6 ++++++
 1 file changed, 6 insertions(+)

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

diff --git a/roundcubemail/SQL/sqlite.update.sql b/roundcubemail/SQL/sqlite.update.sql
index 2db782153..78e283e2d 100644
--- a/roundcubemail/SQL/sqlite.update.sql
+++ b/roundcubemail/SQL/sqlite.update.sql
@@ -140,3 +140,9 @@ INSERT INTO users (user_id, username, mail_host, alias, created, last_login, lan
 CREATE INDEX ix_users_username ON users(username);
 CREATE INDEX ix_users_alias ON users(alias);
 DROP TABLE tmp_users;
+
+-- Updates from version 0.4.2
+
+DROP INDEX ix_users_username;
+CREATE UNIQUE INDEX ix_users_username ON users(username, mail_host);
+
-- 
cgit v1.2.3

