DB triggers and worker stats functionality is done.

Signed-off-by: plamen911 <plamen@lynxlake.org>