Merge pull request #1035 from neontuna/master
Fix sample migration from YAML to JSON column type
This commit is contained in:
commit
176b2903bb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue