if(not exists (select * from sys.all_columns c 
						join sys.tables t on t.object_id = c.object_id
						where c.name = 'Appointment' and t.name = 'T_PRODUCT_FORM'))
begin
alter table PHARM.T_PRODUCT_FORM ADD Appointment bit
end
GO

if(not exists (select * from sys.all_columns c 
						join sys.tables t on t.object_id = c.object_id
						where c.name = 'Appointment' and t.name = 'T_PRODUCT_FORM' and c.is_nullable = 1))
begin
update PHARM.T_PRODUCT_FORM set Appointment = 0
alter table PHARM.T_PRODUCT_FORM ADD Appointment bit not null
end