Class: AddObjectChangesToVersions
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddObjectChangesToVersions
- Defined in:
- lib/generators/paper_trail/templates/add_object_changes_to_versions.rb
Overview
This migration adds the optional object_changes column, in which PaperTrail will store the changes diff for each update event. See the readme for details.
Constant Summary collapse
- TEXT_BYTES =
The largest text column available in all supported RDBMS. See
create_versions.rbfor details. 1_073_741_823
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
9 10 11 |
# File 'lib/generators/paper_trail/templates/add_object_changes_to_versions.rb', line 9 def change add_column :versions, :object_changes, :text, limit: TEXT_BYTES end |