refactor database.yaml