From ace511a771656c983046919333cee501339c98a1 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 6 Oct 2010 13:00:12 +0000
Subject: - Add unique index on users.username+users.mail_host

---
 SQL/mssql.initial.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

diff --git a/SQL/mssql.initial.sql b/SQL/mssql.initial.sql
index 553e68a48..6b031a256 100644
--- a/SQL/mssql.initial.sql
+++ b/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

