
IF EXISTS ( SELECT 1 FROM sys.columns WHERE name = 'old_value' AND OBJECT_ID ( 'event_data_trail' ) = object_id )  
BEGIN
   ALTER TABLE event_data_trail ALTER COLUMN old_value VARCHAR(max);
END 
GO

IF EXISTS ( SELECT 1 FROM sys.columns WHERE name = 'new_value' AND OBJECT_ID ( 'event_data_trail' ) = object_id )  
BEGIN
   ALTER TABLE event_data_trail ALTER COLUMN new_value VARCHAR(max);
END 
GO
