db fixes for buildslaves improvements