 CREATE PROCEDURE stp_Build_Add
 (
     @ProjectName nvarchar(64)
+    , @SourceUrlBase nvarchar(256)
     , @SourceUrl nvarchar(256)
     , @SourceRevision int
     , @IsSuccessful bit

        AND SourceRevision = @SourceRevision AND SourceUrl = @SourceUrl
    IF @buildId IS NULL
    BEGIN
        INSERT INTO Build ...
        SET @buildId = @@IDENTITY
    END
    
    INSERT INTO BuildStep ...
END
    SELECT @projectId = ProjectId FROM Project WHERE ProjectName = @ProjectName
    IF @projectId IS NULL
    BEGIN
        INSERT INTO Project (ProjectName, SourceUrlBase) VALUES (@ProjectName, @SourceUrlBase)
        
        SET @projectId = @@IDENTITY
    END
