While there are IPv6 equivalents for the IPv4 address range, you can’t convert all IPv6 addresses to IPv4 – there are more IPv6 addresses than there are IPv4 addresses.
The only sane way around this issue is to update your application to be able to understand and store IPv6 addresses.