if not exists (select * from sys.syscolumns where name = 'SenderUserId' and id = object_id(N'dbo.SecureAttachment'))
begin
    alter table dbo.SecureAttachment add SenderUserId uniqueidentifier null
end