Skip to content

Null value in (non-attr-encrypted) column when upgrading to 4.0.0 #438

@prognostikos

Description

@prognostikos

We attempted to upgrade attr_encrypted from 3.1.0 to 4.0.0 but ran into a test failure.

We have a model that has an attr_encrypted column as well as a uuid that is generated on insert by the database. After the upgrade, the uuid column of the model was nil in ruby code, though it was generated properly in the database row. Adding a call to reload before accessing the uuid column fixed the issue.

Rake about says:

Rails version             6.1.7.3
Ruby version              ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin21]
RubyGems version          3.3.26
Rack version              2.2.6.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions