if not exists (select * FROM sys.sysobjects where id = object_id(N'dbo.UserRole'))
begin
  create table dbo.UserRole
  (
    UserID uniqueidentifier not null,
    RoleID uniqueidentifier not null,
    IsCustom bit not null constraint DF_UserRole_IsCustom default (0),
    IsDomain bit not null constraint DF_UserRole_IsDomain default (0),
    CreationDate datetime not null constraint DF_UserRole_CreationDate default (getutcdate()),
    ModifiedDate datetime null,
    constraint PK_UserRole primary key clustered (UserID, RoleID)
  );
end;