Replaced mysql with pg