IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'showWizardStatus'
      AND Object_ID = Object_ID(N'pal_SurfaceGridOptions'))
BEGIN
    ALTER TABLE pal_SurfaceGridOptions
	ADD showWizardStatus BIT NULL; 
END

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

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