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


IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'summary'
      AND Object_ID = Object_ID(N'pal_Canvas'))
BEGIN
    ALTER TABLE pal_Canvas
	ADD summary varchar(Max); 
END

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


IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'mediaTypeName'
      AND Object_ID = Object_ID(N'pal_Media'))
BEGIN
    ALTER TABLE pal_Media
	ADD mediaTypeName varchar(350); 
END


IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'mediaBanner'
      AND Object_ID = Object_ID(N'pal_Media'))
BEGIN
    ALTER TABLE pal_Media
	ADD mediaBanner varchar(350); 
END

IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'name'
      AND Object_ID = Object_ID(N'pal_Media'))
BEGIN
    ALTER TABLE pal_Media
	ADD name varchar(350); 
END

IF EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'statusId'
      AND Object_ID = Object_ID(N'pal_Media'))
BEGIN
    ALTER TABLE pal_Media
	Drop column statusId; 
END

IF EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'catId'
      AND Object_ID = Object_ID(N'pal_Media'))
BEGIN
    ALTER TABLE pal_Media
	Drop column catId; 
END

IF EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'venueId'
      AND Object_ID = Object_ID(N'pal_Media'))
BEGIN
    ALTER TABLE pal_Media
	Drop column venueId; 
END

IF EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'location'
      AND Object_ID = Object_ID(N'pal_Media'))
BEGIN
    ALTER TABLE pal_Media
	Drop column location; 
END

IF EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'startTime'
      AND Object_ID = Object_ID(N'pal_Media'))
BEGIN
    ALTER TABLE pal_Media
	Drop column startTime; 
END

IF EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'endTime'
      AND Object_ID = Object_ID(N'pal_Media'))
BEGIN
    ALTER TABLE pal_Media
	Drop column endTime; 
END

IF EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'fbDportEventId'
      AND Object_ID = Object_ID(N'pal_Media'))
BEGIN
    ALTER TABLE pal_Media
	Drop column fbDportEventId; 
END


IF EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'fbProfileEventId'
      AND Object_ID = Object_ID(N'pal_Media'))
BEGIN
    ALTER TABLE pal_Media
	Drop column fbProfileEventId; 
END


IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'thumbWidth'
      AND Object_ID = Object_ID(N'pal_MediaType'))
BEGIN
    ALTER TABLE pal_MediaType
	ADD thumbWidth int; 
END

IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'thumbHeight'
      AND Object_ID = Object_ID(N'pal_MediaType'))
BEGIN
    ALTER TABLE pal_MediaType
	ADD thumbHeight int; 
END

IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'bannerWidth'
      AND Object_ID = Object_ID(N'pal_MediaType'))
BEGIN
    ALTER TABLE pal_MediaType
	ADD bannerWidth int; 
END

IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'bannerHeight'
      AND Object_ID = Object_ID(N'pal_MediaType'))
BEGIN
    ALTER TABLE pal_MediaType
	ADD bannerHeight int; 
END



