From 6237c947583f96df072b535d9b3c6fd7a79e2921 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 8 Jun 2012 13:22:16 +0200
Subject: Fix operator incompat. in some queries on contacts table using MS SQL
 Server (#1488505)

---
 SQL/mssql.upgrade.sql | 9 +++++++++
 1 file changed, 9 insertions(+)

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

diff --git a/SQL/mssql.upgrade.sql b/SQL/mssql.upgrade.sql
index d4a5e41ce..10bae6e47 100644
--- a/SQL/mssql.upgrade.sql
+++ b/SQL/mssql.upgrade.sql
@@ -249,3 +249,12 @@ GO
 ALTER TABLE [dbo].[contacts] ALTER COLUMN [email] [text] COLLATE Latin1_General_CI_AI NOT NULL
 GO
 
+-- Updates from version 0.8-rc
+
+ALTER TABLE [dbo].[contacts] DROP CONSTRAINT [DF_contacts_email]
+GO
+ALTER TABLE [dbo].[contacts] ALTER COLUMN [email] [varchar] (8000) COLLATE Latin1_General_CI_AI NOT NULL
+GO
+ALTER TABLE [dbo].[contacts] ADD CONSTRAINT [DF_contacts_email] DEFAULT ('') FOR [email]
+GO
+
\ No newline at end of file
-- 
cgit v1.2.3


From 7ac99af37b3b761b4daf2f0d9340c17e7855c234 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 10 Jun 2012 10:13:47 +0200
Subject: Fix DDL update from 0.7 for MS SQL Server

---
 SQL/mssql.upgrade.sql | 4 ++++
 1 file changed, 4 insertions(+)

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

diff --git a/SQL/mssql.upgrade.sql b/SQL/mssql.upgrade.sql
index 10bae6e47..d111ef3e7 100644
--- a/SQL/mssql.upgrade.sql
+++ b/SQL/mssql.upgrade.sql
@@ -246,8 +246,12 @@ GO
 
 -- Updates from version 0.7
 
+ALTER TABLE [dbo].[contacts] DROP CONSTRAINT [DF_contacts_email]
+GO
 ALTER TABLE [dbo].[contacts] ALTER COLUMN [email] [text] COLLATE Latin1_General_CI_AI NOT NULL
 GO
+ALTER TABLE [dbo].[contacts] ADD CONSTRAINT [DF_contacts_email] DEFAULT ('') FOR [email]
+GO
 
 -- Updates from version 0.8-rc
 
-- 
cgit v1.2.3

