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


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