Fixed db config
Added type model for pubs