Rails Event Store Versions Save

A Ruby implementation of an Event Store based on Active Record

v2.14.0

3 months ago

RubyEventStore

  • no changes

RailsEventStore

  • no changes

RubyEventStore::ActiveRecord

  • no changes

AggregateRoot

  • no changes

RubyEventStore::RSpec

  • no changes

RubyEventStore::Browser

  • Change: Several UX improvements for displaying events [#1726]

  • Change: Show timestamps in local timezone when browsing stream [#1723, #1727]

    Timezone is detected upon Browser start. There's still an ability to revert display to show timestamps in UTC, using select input in the footer.

    res_browser

v2.13.0

5 months ago

RubyEventStore

  • Change: RubyEventStore::BatchEnumerator optimization [#1708, #1711]

    Skip fetching the next batch if the previous one was smaller than the specified batch size.

RailsEventStore

  • no changes

RubyEventStore::ActiveRecord

  • Change: RubyEventStore::ActiveRecord::BatchEnumerator optimization [#1708, #1711]

    Skip fetching the next batch if the previous one was smaller than the specified batch size)

  • Change: N+1 optimization [#1708, #1710]

    Avoiding N+1 without additional query when join clause is used in the base read query.

AggregateRoot

  • no changes

RubyEventStore::RSpec

  • no changes

RubyEventStore::Browser

  • no changes

v2.12.1

8 months ago

RubyEventStore

  • no changes

RailsEventStore

  • no changes

RubyEventStore::ActiveRecord

  • Fix: foreign key migration generators introduced in v2.12.0[459f4432392522711d40edf2ca4480f59879ba50]

AggregateRoot

  • no changes

RubyEventStore::RSpec

  • no changes

RubyEventStore::Browser

  • no changes

v2.12.0

8 months ago

RubyEventStore

  • Change: Calling Specification#from and Specification#to won't trigger SQL query to check if given event id exists [067e9b7f712faadc939659224da581b73c607c1f]

  • Fix: Raise RubyEventStore::EventNotFound instead of NoMethodError if the event_id passed to Specification#from or Specification#to does not exist while using InMemoryRepository [#1673]

RailsEventStore

  • Add: Support ActiveJob::ConfiguredJob as a valid handler for ActiveJobScheduler [331c16b61a931669bdc76928dc761648a938a174]

RubyEventStore::ActiveRecord

  • Add: Support for ActiveRecord PostGIS adapter in migration generators [#1650, #1668]

  • Add: Support for ActiveRecord Trilogy adapter in migration generators [#1671]

  • Add: Foreign keys for data consistency. This prevents manually removing events at database level if they are already linked in any stream [#1646]

    For existing Rails app installations use:

    bin/rails g rails_event_store_active_record:migration_for_foreign_key_on_event_id
    bin/rails db:migrate
    

    For non–Rails applications:

    bundle exec rake db:migrations:add_foreign_key_on_event_id
    bundle exec rake db:migrate
    

    New installations are no–op.

  • Fix: Raise RubyEventStore::EventNotFound instead of ActiveRecord::RecordNotFound if the event_id passed to Specification#from or Specification#to does not exist [#1673]

AggregateRoot

  • no changes

RubyEventStore::RSpec

  • Fix: Publish matcher works correctly with in_streams specifier [#1670, #1672]

RubyEventStore::Browser

  • no changes

v2.11.1

9 months ago

RubyEventStore

  • no changes

RailsEventStore

  • no changes

RubyEventStore::ActiveRecord

  • no changes

AggregateRoot

  • no changes

RubyEventStore::RSpec

  • no changes

RubyEventStore::Browser

  • Fix: Browser being unusable due to two–section only version number and two–digit number being a part of version number [040018740df199b6a398350fdcd93534cc1da545, #1647]

v2.11.0

10 months ago

RubyEventStore

  • Fix: Restoring original type with PreserveTypes won't break when stored data shape is different than original one. This change also allows using OpenStruct for data and metadata [3c5d928]

RailsEventStore

  • Add: Out of the box OpenStruct support in JSONClient [2bed49c]

RubyEventStore::ActiveRecord

  • no changes

AggregateRoot

  • no changes

RubyEventStore::RSpec

  • no changes

RubyEventStore::Browser

  • no changes

v2.10

10 months ago

RubyEventStore

  • no changes

RailsEventStore

  • Add: Optional ActiveJobIdOnlySchedulerthat carries only event_id. The largest benefit of it has constant size in redis as opposed to size dependent on data and metadata. With the scheduler comes the AsyncHandlerJobIdOnly [#755, 46dedc287ee8fc5a6fa4a53890307494d753c802]

  • Fix: JSONClient correctly handles mapper argument. Previously the mapper argument was unusable, as it was always and unconditionally overwritten [77b73380b07a11c4b05f8c7da615f9fef3f4b7c5]

RubyEventStore::ActiveRecord

  • Add: MySQL now supports json column data type for storing data and metadata of events [8e4850b2b66296b636883e22934e8a7fede6e7d6, ]

  • Fix: streams_of being slow due to lack of index on event_id in event_store_events_in_streams table (e.g. causing laggy event overview in RES Browser) [5c2c367aa7a737cfe35ed6fe80f7ea7990a24903]

    When installing RES from scratch, you don't have to do anything, RES setup will generate valid db migrations. If you're running RES in your existing application, please run accordingly:

    • for a Rails app:

      bin/rails g rails_event_store_active_record:migration_for_missing_event_id_index
      bin/rails db:migrate
      
    • for a non–Rails Ruby app:

      bundle exec rake db:migrations:fix_missing_event_id_index
      bundle exec rake db:migrate
      

AggregateRoot

  • no changes

RubyEventStore::RSpec

  • no changes

RubyEventStore::Browser

  • no changes

v2.9.1

1 year ago

RubyEventStore

  • Fix: Encryption Mapper The missing transformation has been added. The RubyEventStore::Metadata requires metadata keys to be symbols.
  • Change: RubyEventStore::Client now has the InMemoryRepository as the default repository. There's no required action. This change is backward compatible.

RailsEventStore

  • no changes

RubyEventStore::ActiveRecord

  • Fix: Problem with reading the last event sorted by valid_at.
  • Change: Update ActiveRecord::Migration version from 4.2 to the latest. The schema doesn't change. There's no required action.

AggregateRoot

  • no changes

RubyEventStore::RSpec

  • no changes

RubyEventStore::Browser

  • no changes

v2.9.0

1 year ago

RubyEventStore

  • no changes

RailsEventStore

  • Add: Enhanced Rails Event Store client for working with JSONB datatype.

RailsEventStore::JSONClient is built on top of RailsEventStore::Client and supports the same functionality. However, it's optimized to work with the JSONB data type and provides valid configuration for serializing and deserializing events.

To configure this in your project, use:

  Rails.configuration.event_store = RailsEventStore::JSONClient.new

You can find more detailed information about configuration in the docs.

  • Change: Improved APP_TEMPLATE, which can now be used both for new and existing Rails applications. The goal of this change is to minimize the number of steps required to install RailsEventStore.

The template:

  • adds rails_event_store to your Gemfile
  • generates config/initializers/rails_event_store.rb with sane defaults and exposes the client under Rails.configuration.event_store
  • pre–configure the event browser to make it available under /res url in your application in development environment
  • runs bundler to install necessary dependencies
  • generates and executes migrations files

To use the template in an existing Rails application, cd to the root directory and run the following command

  bin/rails app:template LOCATION=https://railseventstore.org/new

If you're starting a new Rails application, run the following command

  rails new -m https://railseventstore.org/new APP_NAME

Read more about options that can be specified during the setup, eg. a database that you want to use.

RailsEventStoreActiveRecord

  • no changes

AggregateRoot

  • no changes

RubyEventStore::RSpec

  • no changes

RubyEventStore::Browser

  • no changes

v2.8.1

1 year ago

RubyEventStore

  • no changes

RailsEventStore

  • no changes

RubyEventStore::ActiveRecord

  • Fix: time filtering methods work correctly when #as_of reading order is used [#1521]

AggregateRoot

  • no changes

RubyEventStore::RSpec

  • no changes

RubyEventStore::Browser

  • no changes