Skip to content

paper_trail 10.0.0

10.0.0 (2018-09-01)

PT 10 tackles some tough issues that required breaking changes. We fixed a rare issue with STI, and saved major disk space in databases with tens of millions of version records. Special thanks to @lorint and @seanlinsley, respectively.

Breaking changes affecting most people

  • #1132 - Removed a dozen methods deprecated in PT 9. Make sure you've addressed all deprecation warnings before upgrading.

Breaking changes affecting fewer people

  • db9c392d - paper_trail-association_tracking is no longer a runtime dependency. If you use it (track_associations = true) you must now add it to your own Gemfile. See also PT-AT #7
  • #1130 - Removed save_changes. For those wanting to save space, it's more effective to drop the object column. If you need ultimate control over the object_changes column, you can write your own object_changes_adapter.

Breaking changes most people won't care about

  • #1121 - touch now always inserts null in object_changes.
  • #1123 - object_changes is now populated on destroy in order to make where_object_changes usable when you've dropped the object column. Sean is working on an optional backport migration and will post about it in #1099 when he's done.

Added

  • #1099 - Ability to save ~50% storage space by making the object column optional. Note that this disables reify and where_object.

Fixed

  • #594 - A rare issue with reification of STI subclasses, affecting only PT-AT users who have a model with mutliple associations, whose foreign keys are named the same, and whose foreign models are STI with the same parent class. This fix requires a schema change. See docs section 4.b.1 The optional item_subtype column for instructions.