All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fix unstable class resolution in Reifier.model_from_table_name
- Add
ignored_databasesconfiguration option to skip IronTrail for specific databases in multi-db setups. Works symmetrically withignored_tables. Schema dumps and migration triggers are skipped for ignored databases.
- Bumped versions of dependencies in gemspec and github workflows
- Undid last changes to
compute_changeset. It will respect the semantics ofrec_delta
compute_changesetnow returnsnilwhenrec_deltais empty
- Add
rec_classmethod toIronTrail::ChangeModelConcernto infer the record class from the table name and type attribute - Add
compute_changesetmethod toIronTrail::ChangeModelConcernto get properly deserialized attribute changes - Add PostgreSQL 18 to the CI test matrix
- Add '.with_delta_other_than' to
IronTrail::ChangeModelConcern - Add
irontrail_set_actorrspec helper method
- Call
IronTrail::Current.resetbefore each spec when usingiron_trail/testing/rspec - Attributes in iron trails won't try to set attributes via send("#{attr_name}=") anymore
- IronTrail::Current#merge_metadata now raises a proper error if argument is invalid
- Timestamps are reified correctly when the rails app uses a non-UTC time zone
- Fixes
IronTrail::ChangeModelConcern#where_object_changes_*methods when calling them with nil values
- Drop RequestStore dependency and use rails' ActiveSupport::CurrentAttributes
- Use a more accurate value for
irontrail_changes.created_aton updates that don't touch the updated_at column
IronTrail::DbFunctions#trigger_errors_metricsmethod to be able to monitor error metrics
- Use model timestamps (created_at, updated_at) for irontrail_changes.created_at column
- Use STATEMENT_TIMESTAMP() instead of NOW() for irontrail_changes.created_at column
- Dropped
pg_partydependency and use regular tables in test suite - Test in CI with the latest versions
#travel_tonow returns nil when no versions are found in the specified timestamp.
- Improved developer experience, added CONTRIBUTING.md docs
- Publish gem using a github workflow
ActiveRecord::Reflection#reflect_on_all_associationswould not work for models having IronTrail enabled
- Now able to travel back in time with
model.iron_trails.travel_to(some_timestamp) - Add ability to "reify" a trail, that is, to restore the object to what it was in a given trail
- Added helper methods to
IronTrail::ChangeModelConcern:insert_operation?,update_operation?,delete_operation? - Added helpers to filter/scope trails:
model.iron_trails.inserts(also '.deletes' and.updates) - Full STI (Single Table Inheritance) support now added with proper tests
- Added means to disable tracking ignored tables
- Allow enabling/disabling IronTrail in rspec
Initial release.