active_record_doctor icon indicating copy to clipboard operation
active_record_doctor copied to clipboard

Suggest to use `jsonb` instead of `json`

Open fatkodima opened this issue 2 years ago • 2 comments

This is PostgreSQL specific. The problem is described here - https://github.com/fatkodima/online_migrations#adding-a-json-column. Also seems like jsonb is the preferred type and it also shows a better performance.

fatkodima avatar Jul 20 '22 12:07 fatkodima

I like the idea.

More generally, we could have a detector that looks for columns of type X and recommends converting to type Y. Can you think of any other examples where this would be a good idea?

Also, please hold off with development as I'd like to clean up the PR backlog first.

gregnavis avatar Jul 20 '22 14:07 gregnavis

Can you think of any other examples where this would be a good idea?

From the top of my head - nope, but need to research.

Also, please hold off with development as I'd like to clean up the PR backlog first.

😄

fatkodima avatar Jul 20 '22 14:07 fatkodima