Closed kratob closed 7 years ago
What would be some useful examples for database-specific types we could no longer support with this change? I guess there are some useful ones like array fields or json fields?
In theory, but I'm not sure array
or json
types would lead to any useful behavior when it comes to coercion. I'll try to see if I can come up with a useful example.
Another thing that could be possible (but I'm not sure either), is that the old behavior allowed for some aliases (like :varchar
for :string
)
I've taken a look and cannot find an example where it would make a difference. The specialized database types (like :json
, :polygon
, :macaddr
) define custom serialization logic (which we don't use), but no casting logic.
I've tried to change the type casting logic to not require a database connection. This is probably a breaking change for Rails 4 and 5, since it means no support for database-specific types, but I never actually used this. I don't feel this has been a useful (or in the case of
ActiveType::Object
expected) feature, so I think this should be worth it? @triskweline: Do you have a opinion on this?