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/mssql.initial.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'roundcubemail/SQL/mssql.initial.sql')

diff --git a/roundcubemail/SQL/mssql.initial.sql b/roundcubemail/SQL/mssql.initial.sql
index 553e68a48..6b031a256 100644
--- a/roundcubemail/SQL/mssql.initial.sql
+++ b/roundcubemail/SQL/mssql.initial.sql
@@ -255,7 +255,7 @@ ALTER TABLE [dbo].[users] ADD
 	CONSTRAINT [DF_users_created] DEFAULT (getdate()) FOR [created]
 GO
 
-CREATE  INDEX [IX_users_username] ON [dbo].[users]([username]) ON [PRIMARY]
+CREATE  UNIQUE INDEX [IX_users_username] ON [dbo].[users]([username],[mail_host]) ON [PRIMARY]
 GO
 
 CREATE  INDEX [IX_users_alias] ON [dbo].[users]([alias]) ON [PRIMARY]
-- 
cgit v1.2.3

