Changed way of get configurations in database to prepare future legacy's droping