ActiveRecord Column DSL: Support ActiveRecord::Type::Json and ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Jsonb
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 873
- Forks
- 164
- Avg merge
- 4d 27m
- Merged PRs (30d)
- 9
Description
I was surprised to see that both json and jsonb columns in postgres are mapped as T.untyped despite having popular usage. I couldn't find any discussions about this when searching the issues.
json => ActiveRecord::Type::Json
jsonb => ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Jsonb
Question for maintainers: Are there any known gotchas for implementing this in a straightforward way compared to other types? I have some concerns here because it seems like if it isn't implemented there was a good reason for that, but I couldn't find a mention of that anywhere.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the ActiveRecord Column DSL handling for type mappings and compare it with mappings for other ActiveRecord types. Check how ActiveRecord::Type::Json and ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Jsonb should appear in generated RBI output; done means json and jsonb columns are no longer typed as T.untyped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, ruby
- Domain
- databases, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100