Skip to content
  • Ryuta Kamizono's avatar
    5b47e267
    Restore legacy YAML compatibility for MySQL with `active_record_yaml_version: 1` · 5b47e267
    Ryuta Kamizono authored
    We had removed the dedicated `MysqlDateTime`, `MysqlJson`, and
    `OID::Json` classes in the past (f1a0fa9e, #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.
    5b47e267
    Restore legacy YAML compatibility for MySQL with `active_record_yaml_version: 1`
    Ryuta Kamizono authored
    We had removed the dedicated `MysqlDateTime`, `MysqlJson`, and
    `OID::Json` classes in the past (f1a0fa9e, #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.
Loading