I have a table on my application storing tens of thousands of events (such as when a user logs in) and the number is growing. Each event records the IP address which can be either IPv4/6. This is not elegant design nor efficient for storing records, or indexing.

IPv4 should be stored as `INT(10) UNSIGNED` and IPv6 as `BINARY(16)` (am I right?). I want to create two new columns e.g. `ipv4` and `ipv6` and populate them with either `NULL` or an IPv4/6 address. Currently, all IP addresses are stored in a column called `event_meta` as a `longtext`.

Can this be done?