All Versions
29
Latest Version
Avg Release Cycle
79 days
Latest Release
826 days ago

Changelog History
Page 1

  • v1.2.1 Changes

    January 13, 2022
    • [Fixes #207] Add support for the use of table_name_prefix or table_name_suffix. ([@cavi21][])

    • ๐Ÿš… [Fixes #205] Allow rails destroy logidze:model SomeModel to delete the migration file. ([@danielmklein][])

  • 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.

    • [Fixes #69] Fallback on NUMERIC_VALUE_OUT_OF_RANGE exception ([@skryukov][])

    • [Fixes #192] Skip log_data column during apply_column_diff ([@skryukov][])

  • 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 = :warn to be notified by warning, or Logidze.pending_upgrade = :error if you want Logidze to raise an error.

    • ๐Ÿ›  [Fixes #171] Stringify jsonb column values within snapshots. ([@skryukov][])

    • ๐Ÿ›  [Fixes #175] Set dynamic ActiveRecord version for migrations. ([@skryukov][])

    • ๐Ÿšš [Fixes #184] Remove Rails meta-gem dependency ([@bf4][])

  • v1.0.0 Changes

    November 09, 2020
    • โž• Add --name option 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_snapshot to 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 like with_full_snapshot { record.touch } to create a log entry with the current state.

    • Add #create_logidze_snapshot! and .create_logidze_snapshot methods. ([@palkan][])

    • โž• Add integration with fx gem. ([@palkan][])

    Now it's possible to use Logidze with schema.rb. Add fx gem to the project, and new migrations will be using Fx create_function / create_trigger functions.

    • ๐Ÿ”จ Refactored columns filtering. ([@palkan][])

    ๐Ÿ“‡ Renamed --whitelist/--blacklist to --only/--except correspondingly.

    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][])
  • v1.0.0.rc1 Changes

    September 01, 2020
    • Add .with_full_snapshot to 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 like with_full_snapshot { record.touch } to create a log entry with the current state.

    • Add #create_logidze_snapshot! and .create_logidze_snapshot methods. ([@palkan][])

    • โž• Add integration with fx gem. ([@palkan][])

    Now it's possible to use Logidze with schema.rb. Add fx gem to the project, and new migrations will be using Fx create_function / create_trigger functions.

    • ๐Ÿ”จ Refactored columns filtering. ([@palkan][])

    ๐Ÿ“‡ Renamed --whitelist/--blacklist to --only/--except correspondingly.

    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][])
  • v0.12.0 Changes

    January 02, 2020
    • PR #143 Add :transactional option to #with_meta and #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 :transactional option by default is set to true.

    Usage:

    Logidze.with_meta({ip: request.ip}, transactional: false) do
      post.save!
    end
    

    or

    Logidze.with_responsible(user.id, transactional: false) do
      post.save!
    end
    
  • v0.11.0 Changes

    August 15, 2019

    ๐ŸŒฒ This release reverts some changes made in 0.10.0 related to ignore_log_data functionality.

    ๐Ÿ”„ Changes

    • ๐Ÿ‘ป Return nil when log_data is not loaded instead of raising an exception.

    We cannot distinguish between not loaded log_data and not-yet-created (i.e. for new records).
    The latter could be used in frameworks/gems (example).

    • ๐ŸŒฒ Only allow specifying ignore_log_data at 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 the log_data column.

    ๐ŸŒฒ This change removes Logidze.with_log_data method.

  • v0.10.0 Changes

    May 15, 2019

    ๐Ÿ”„ Changes

    • ๐Ÿ’Ž Ruby >= 2.4 is required

    ๐Ÿ”‹ Features

    • ๐ŸŒฒ Added global configuration for :ignore_log_data option.

    0๏ธโƒฃ Now it's possible to avoid loading log_data from the DB by default with

    Logidze.ignore\_log\_data\_by\_default = true
    

    ๐ŸŒฒ In cases when ignore_log_data: false is explicitly passed to the ignore_log_data the default setting is being overriden. Also, it's possible to change it inside the block:

    Logidze.with\_log\_data doPost.find(params[:id]).log\_dataend
    

    PR #111

    • ๐ŸŒฒ Added #reset_log_data API to nullify log_data column.

    Now you can reset the history for a record (or records):

    # for single recordrecord.reset\_log\_data# for relationUser.where(active: true).reset\_log\_data
    

    PR #110

  • v0.9.0 Changes

    November 28, 2018

    ๐Ÿ”‹ Features

    • ๐ŸŒฒ Added #reload_log_data to fetch the actual log_data from 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_data option to #has_logidze to avoid selecting log_data by 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][])