if not exists(select * from sys.sysobjects where id = object_id(N'dbo.InventoryScanADUser'))
begin
    create table dbo.InventoryScanADUser (
        ScanID uniqueidentifier not null constraint FK_InventoryScanADUser_ScanID foreign key references dbo.InventoryScan(ID),
        ADUserID uniqueidentifier not null constraint FK_InventoryScanADUser_ADUserID foreign key references dbo.InventoryADUser(ID),
        constraint PK_InventoryScanADUser primary key clustered (ScanID, ADUserID)
    );
end;