Browse Source
If you add an object_changes column to your versions table, PaperTrail will store the changes diff in each version.pull/856/head v0.2.6
James Rose
2 years ago
committed by
GitHub
2 changed files with 14 additions and 29 deletions
@ -0,0 +1,12 @@
|
||||
# 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. |
||||
class AddObjectChangesToVersions < ActiveRecord::Migration[7.0] |
||||
# The largest text column available in all supported RDBMS. |
||||
# See `create_versions.rb` for details. |
||||
TEXT_BYTES = 1_073_741_823 |
||||
|
||||
def change |
||||
add_column :versions, :object_changes, :text, limit: TEXT_BYTES |
||||
end |
||||
end |
Loading…
Reference in new issue