Converts from sqlite to postgres.