IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'isCustomSource'
      AND Object_ID = Object_ID(N'pal_SurfaceField'))
BEGIN
	ALTER TABLE [dbo].[pal_SurfaceField]
	ADD [isCustomSource] bit Null;
END


IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'relationalWhere'
      AND Object_ID = Object_ID(N'pal_SurfaceField'))
BEGIN
	ALTER TABLE [dbo].[pal_SurfaceField]
	ADD [relationalWhere] varchar(Max);
END