20121201032355_add_object_changes_to_versions.rb 449 B

12345678910111213
  1. # This migration adds the optional `object_changes` column, in which PaperTrail
  2. # will store the `changes` diff for each update event. See the readme for
  3. # details.
  4. class AddObjectChangesToVersions < ActiveRecord::Migration
  5. # The largest text column available in all supported RDBMS.
  6. # See `create_versions.rb` for details.
  7. TEXT_BYTES = 1_073_741_823
  8. def change
  9. add_column :versions, :object_changes, :text, limit: TEXT_BYTES
  10. end
  11. end