Changelog History
Page 1
-
v1.2.1 Changes
January 13, 2022 -
v1.2.0 Changes
June 11, 2021- โ Add user-defined exception handling ([@skryukov][])
0๏ธโฃ By default, Logidze raises an exception which causes the entire transaction to fail. To change this behavior, it's now possible to override
logidze_capture_exception(error_data jsonb)function. -
v1.1.0 Changes
March 31, 2021- โ Add pending upgrade checks [Experimental]. ([@skryukov][])
โฌ๏ธ Now Logidze can check for a pending upgrade. Use
Logidze.pending_upgrade = :warnto be notified by warning, orLogidze.pending_upgrade = :errorif you want Logidze to raise an error. -
v1.0.0 Changes
November 09, 2020- โ Add
--nameoption to model generator to specify the migration name. ([@palkan][])
โก๏ธ When you update Logidze installation for a model multiple times, you might hit the
DuplicateMigrationNameError(see #167).- Add
.with_full_snapshotto add full snapshots to the log instead of diffs. ([@palkan][])
โก๏ธ Useful in combination with
.without_logging: first, you perform multiple updates without logging, then you do something likewith_full_snapshot { record.touch }to create a log entry with the current state.Add
#create_logidze_snapshot!and.create_logidze_snapshotmethods. ([@palkan][])โ Add integration with
fxgem. ([@palkan][])
Now it's possible to use Logidze with
schema.rb. Addfxgem to the project, and new migrations will be using Fxcreate_function/create_triggerfunctions.- ๐จ Refactored columns filtering. ([@palkan][])
๐ Renamed
--whitelist/--blacklistto--only/--exceptcorrespondingly.The only-logic has been changed: previously we collected the list of columns to ignore at the migration generation time, now we filter the columns within the trigger function (thus, schema changes do not affect the columns being tracked).
- โฌ๏ธ Dropped support for Rails 4.2, Ruby 2.4 and PostgreSQL 9.5. ([@palkan][])
- โ Add
-
v1.0.0.rc1 Changes
September 01, 2020- Add
.with_full_snapshotto add full snapshots to the log instead of diffs. ([@palkan][])
โก๏ธ Useful in combination with
.without_logging: first, you perform multiple updates without logging, then you do something likewith_full_snapshot { record.touch }to create a log entry with the current state.Add
#create_logidze_snapshot!and.create_logidze_snapshotmethods. ([@palkan][])โ Add integration with
fxgem. ([@palkan][])
Now it's possible to use Logidze with
schema.rb. Addfxgem to the project, and new migrations will be using Fxcreate_function/create_triggerfunctions.- ๐จ Refactored columns filtering. ([@palkan][])
๐ Renamed
--whitelist/--blacklistto--only/--exceptcorrespondingly.The only-logic has been changed: previously we collected the list of columns to ignore at the migration generation time, now we filter the columns within the trigger function (thus, schema changes do not affect the columns being tracked).
- โฌ๏ธ Dropped support for Rails 4.2, Ruby 2.4 and PostgreSQL 9.5. ([@palkan][])
- Add
-
v0.12.0 Changes
January 02, 2020- PR #143 Add
:transactionaloption to#with_metaand#with_responsible([@oleg-kiviljov][])
0๏ธโฃ Now it's possible to set meta and responsible without wrapping the block into a DB transaction. For backward compatibility
:transactionaloption by default is set totrue.Usage:
Logidze.with_meta({ip: request.ip}, transactional: false) do post.save! endor
Logidze.with_responsible(user.id, transactional: false) do post.save! end - PR #143 Add
-
v0.11.0 Changes
August 15, 2019๐ฒ This release reverts some changes made in 0.10.0 related to
ignore_log_datafunctionality.๐ Changes
- ๐ป Return
nilwhenlog_datais not loaded instead of raising an exception.
We cannot distinguish between not loaded
log_dataand not-yet-created (i.e. for new records).
The latter could be used in frameworks/gems (example).- ๐ฒ Only allow specifying
ignore_log_dataat boot time without runtime modifications.
Playing with ActiveRecord default scopes wasn't a good idea. We fallback to a more explicit way of telling AR
when to load or ignore thelog_datacolumn.๐ฒ This change removes
Logidze.with_log_datamethod. - ๐ป Return
-
v0.10.0 Changes
May 15, 2019๐ Changes
- ๐ Ruby >= 2.4 is required
๐ Features
- ๐ฒ Added global configuration for
:ignore_log_dataoption.
0๏ธโฃ Now it's possible to avoid loading
log_datafrom the DB by default withLogidze.ignore\_log\_data\_by\_default = true๐ฒ In cases when
ignore_log_data: falseis explicitly passed to theignore_log_datathe default setting is being overriden. Also, it's possible to change it inside the block:Logidze.with\_log\_data doPost.find(params[:id]).log\_dataendPR #111
- ๐ฒ Added
#reset_log_dataAPI to nullifylog_datacolumn.
Now you can reset the history for a record (or records):
# for single recordrecord.reset\_log\_data# for relationUser.where(active: true).reset\_log\_dataPR #110
-
v0.9.0 Changes
November 28, 2018๐ Features
๐ฒ Added
#reload_log_datato fetch the actuallog_datafrom DB.user = User.create!(params) user.log_data #=> nil, 'cause it's generated DB-sideuser.reload_log_data user.log_data #=> Logidze::History
๐ฒ Added
:ignore_log_dataoption to#has_logidzeto avoid selectinglog_databy default.
Usage:
class User \< ActiveRecord::Base has\_logidze ignore\_log\_data: trueendUser.all #=\> SELECT id, name FROM usersUser.with\_log\_data #=\> SELECT id, name, log\_data FROM usersuser = User.find(params[:id]) user.log\_data #=\> ActiveModel::MissingAttributeErroruser.reload\_log\_data #=\> Logidze::History -
v0.8.1 Changes
October 22, 2018- ๐ฒ PR #93] Return 0 for log size when log_data is nil ([@duderman][])