Valid column type for notable_requests.ip column
wscourge opened this issue · 3 comments
PostgreSQL is the most popular database choice in the Rails world, as far as I can see you guys also use it extensively.
There are multiple advantages of using the inet
column type for IP addresses, those help in the further problems investigations that seem very useful considering what you track with Notable (which is awesome by the way).
You can read some simple examples of those in Using PostgreSQL cidr
and inet
types, operators, and functions article.
If you decide to go with this, take a look at how it's implemented in the Devise gem.
Cheers, and keep up the good work @ankane, you create one of my favorite open-sourced Ruby gems 👍
Hey @wscourge, thanks for the suggestion and links! For simplicity, I think it's better to keep it a string
right now, but it sounds like users can edit the migration manually if they want and everything should work.
That's true, I've done it myself and it does work as expected, hence only the suggestion and not an actual PR submit. Feel free to close the issue.
Will do. I imagine anyone searching for this will come across this issue, so thanks again for sharing.