if EXISTS(SELECT * FROM sys.columns 
    WHERE Object_ID = Object_ID(N'pal_MedicalPatientHistory') AND Name = N'patientId')
BEGIN
EXECUTE sp_rename N'dbo.pal_MedicalPatientHistory.patientId', N'surfaceItemId', 'COLUMN' 
END

if NOT EXISTS(SELECT * FROM sys.columns 
    WHERE Object_ID = Object_ID(N'pal_Canvas') AND Name = N'hideNavigation')
BEGIN
ALTER TABLE [dbo].[pal_Canvas]
    ADD [hideNavigation] BIT NULL;
END