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

IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'filterValue'
      AND Object_ID = Object_ID(N'pal_SurfaceLink'))
BEGIN
    ALTER TABLE pal_SurfaceLink
	ADD filterValue VARCHAR(200) NULL; 
END

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

