IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_GetSurfaceQueryDataPaged]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[sp_GetSurfaceQueryDataPaged]


IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_GetSurfaceQueryDataCount]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[sp_GetSurfaceQueryDataCount]



IF (EXISTS 
	(SELECT * FROM INFORMATION_SCHEMA.TABLES 
    WHERE TABLE_NAME = 'pal_Campaign'))
BEGIN
	ALTER TABLE pal_Campaign ALTER COLUMN filterValue varchar(MAX) NULL;
END
