refactor database yml