Merge pull request #1035 from neontuna/master

Fix sample migration from YAML to JSON column type
This commit is contained in:
Jared Beck 2018-01-11 11:10:28 -05:00 committed by GitHub
commit 176b2903bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1239,7 +1239,7 @@ add_column :versions, :new_object, :jsonb # or :json
PaperTrail::Version.reset_column_information
PaperTrail::Version.find_each do |version|
version.update_column :new_object, YAML.load(version.object)
version.update_column :new_object, YAML.load(version.object) if version.object
end
remove_column :versions, :object