Fix db insert/update
Missed diffs for advanced jobs