Changed from sqlite to pg