[backend] use defined host variable

This fixes the many warning messages during test suite run
[api] reducing SQL changes and avoiding dead locks

Only really needed changes are applied to the database when running issue tracking
on changed sources.