Changed sqlite to postgres