alter table eml_log
alter column eml_log_content varchar(max)
GO

alter table log_err
alter column log_err_desc varchar(max)
GO


IF NOT EXISTS (
    SELECT * 
    FROM sys.columns 
    WHERE object_id = OBJECT_ID('eml_log') 
    AND name = 'eml_log_doc_no'
)
BEGIN
    ALTER TABLE eml_log
    ADD eml_log_doc_no varchar(30) NULL
END
GO