if not exists(select * from sys.sysobjects where id = object_id(N'dbo.SecureMessage')) begin
  create table dbo.SecureMessage(
   ID uniqueidentifier constraint DF_SecureMessage_ID default newid() not null,
   Title varchar(500) not null,
   MessageType int not null,
   CreatedUtc DateTime not null constraint DF_SecureMessage_CreatedUtc default (getutcdate()),
   ReadUtc DateTime null,
   ExpiresUtc DateTime null,
   SenderId uniqueidentifier not null,
   RecipientId uniqueidentifier not null,
   Status int not null,
   Content varchar(max)
   constraint PK_SecureMessage primary key clustered(ID)
 );
end;