Shopify / tapioca

The swiss army knife of RBI generation
MIT License
701 stars 115 forks source link

Support Postgres `cidr` column type #1907

Closed alex-tan closed 1 month ago

alex-tan commented 1 month ago

Motivation

1837 This adds types for cidr columns

Implementation

I added a when to type_for_activerecord_value, following the pattern used for Uuid.

Tests

I didn't because I don't believe there's an established way in the test suite to test against Postgres directly. I verified this worked in our app that has a Cidr column.

andyw8 commented 1 month ago

For anyone else wondering what CIDR means:

https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing