IF EXISTS (select * from sys.columns sc (NOLOCK) 
INNER JOIN sys.systypes ss (NOLOCK) ON sc.user_type_id = ss.xtype
INNER JOIN SysObjects so (NOLOCK) On sc.object_id = so.id
where sc.name = 'Message' and so.name = 'SMSLog'
and ss.name = 'varchar')

	ALTER TABLE SMSLog ALTER COLUMN Message NVarchar(max)
