Changed db from sqlite to pg