Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate database specific JSON types #29666

Merged

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Jul 4, 2017

We already have database agnostic Type::Json since #29220.

@rafaelfranca
Copy link
Member

Those classes are nodoc so they can be removed without deprecation.

We already have database agnostic `Type::Json` since rails#29220.
@kamipo kamipo force-pushed the deprecate_database_specific_json_types branch from d210ed3 to 2568414 Compare July 4, 2017 16:18
@kamipo
Copy link
Member Author

kamipo commented Jul 4, 2017

Indeed. I changed to remove the database specific types.

@rafaelfranca rafaelfranca merged commit c248600 into rails:master Jul 4, 2017
@kamipo kamipo deleted the deprecate_database_specific_json_types branch July 4, 2017 19:33
kamipo added a commit to kamipo/rails that referenced this pull request Jun 25, 2020
…version: 1`

We had removed the dedicated `MysqlDateTime`, `MysqlJson`, and
`OID::Json` classes in the past (f1a0fa9, rails#29666), so legacy YAML
loading has no longer always perfectly compatiblity.

Fortunately, v2 (Rails 5.1 style) YAML doesn't contain type information
in almost all cases (unless serializing object using custom select), so
usually removing dedicated type affects to legacy YAML older than v1
(Rails 5.0 style) YAML only.

This restores legacy YAML compatibility for MySQL with v1 format by
adding the class alias in YAML for `MysqlString` which is most recently
reported about compatibility concern. It also affects to legacy Rails
4.2 style YAML, but 4.2 style YAML had already broken by removing
`MysqlDateTime` over 4 years ago.
kamipo added a commit to kamipo/rails that referenced this pull request Jun 30, 2020
… MySQL

Context rails#39599 (comment).

Similar with rails#39611.

Actually we never said we would keep Mashal compatibility between two
versions of Rails, so we sometimes directly removed the dedicated types
in the past (e.g. f1a0fa9, rails#29666), but that direct removing makes cache
rotation harder.

Keeping the unused constant in new version at least during one version
will help cache rotation easier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants