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.upgrade.sql | 7 +++++++
 1 file changed, 7 insertions(+)

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

diff --git a/SQL/mssql.upgrade.sql b/SQL/mssql.upgrade.sql
index 1aa771b1f..6b3cd6d03 100644
--- a/SQL/mssql.upgrade.sql
+++ b/SQL/mssql.upgrade.sql
@@ -87,3 +87,10 @@ ALTER TABLE [dbo].[contactgroups] ADD CONSTRAINT [FK_contactgroups_user_id]
     ON DELETE CASCADE ON UPDATE CASCADE
 GO
 
+-- Updates from version 0.4.2
+
+DROP INDEX [IX_users_username]
+GO
+CREATE UNIQUE INDEX [IX_users_username] ON [dbo].[users]([username],[mail_host]) ON [PRIMARY]
+GO
+
-- 
cgit v1.2.3

