Changed from sqlite to postgres