Update databases to use PostGres, and automated testing