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

IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'newContactName'
      AND Object_ID = Object_ID(N'pal_CalendarEvent'))
BEGIN
    ALTER TABLE pal_CalendarEvent
	ADD newContactName varchar(500) NULL; 
END

IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'newContactSurname'
      AND Object_ID = Object_ID(N'pal_CalendarEvent'))
BEGIN
    ALTER TABLE pal_CalendarEvent
	ADD newContactSurname varchar(500) NULL; 
END

IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'newContactTel'
      AND Object_ID = Object_ID(N'pal_CalendarEvent'))
BEGIN
    ALTER TABLE pal_CalendarEvent
	ADD newContactTel varchar(50) NULL; 
END

IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'newContactEmail'
      AND Object_ID = Object_ID(N'pal_CalendarEvent'))
BEGIN
    ALTER TABLE pal_CalendarEvent
	ADD newContactEmail varchar(500) NULL; 
END