add database config and pg adapter