From 8ab1b7a9afbb0766f06057c7848fdf2e40e15bfe Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Thu, 5 Dec 2013 01:28:29 +0400 Subject: [PATCH 1/2] fix www.websitepanel.net/global-forums/topic/2-1-0-242-sql-update-bug-when-going-from-2-1-0-227/ --- WebsitePanel/Database/update_db.sql | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 1d07ff93..1f7c13e1 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -2632,14 +2632,18 @@ GO IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='CRMUsers' AND COLS.name='CALType') BEGIN ALTER TABLE [dbo].[CRMUsers] ADD - [CALType] [int] NULL; - -UPDATE [dbo].[CRMUsers] - SET - CALType = 0; + [CALType] [int] NULL END GO +BEGIN +UPDATE [dbo].[CRMUsers] + SET + CALType = 0 WHERE CALType = NULL +END +GO + + ALTER PROCEDURE [dbo].[InsertCRMUser] ( @ItemID int, From 4f6d1f2c506132b524dc1bdf38a59052e0e1da5b Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Thu, 5 Dec 2013 01:45:16 +0400 Subject: [PATCH 2/2] fix www.websitepanel.net/global-forums/topic/2-1-0-242-sql-update-bug-when-going-from-2-1-0-227/ --- WebsitePanel/Database/update_db.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 1f7c13e1..a6c353fb 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -2639,7 +2639,7 @@ GO BEGIN UPDATE [dbo].[CRMUsers] SET - CALType = 0 WHERE CALType = NULL + CALType = 0 WHERE CALType IS NULL END GO