Module: Sequent

Defined in:
lib/sequent/core/tenant_event_store.rb,
lib/version.rb,
lib/sequent/core/event.rb,
lib/sequent/core/command.rb,
lib/sequent/core/event_store.rb,
lib/sequent/core/event_record.rb,
lib/sequent/core/value_object.rb,
lib/sequent/core/aggregate_root.rb,
lib/sequent/core/command_record.rb,
lib/sequent/core/command_service.rb,
lib/sequent/core/helpers/copyable.rb,
lib/sequent/core/helpers/mergable.rb,
lib/sequent/migrations/migrations.rb,
lib/sequent/core/base_event_handler.rb,
lib/sequent/core/helpers/uuid_helper.rb,
lib/sequent/core/aggregate_repository.rb,
lib/sequent/core/base_command_handler.rb,
lib/sequent/core/helpers/self_applier.rb,
lib/sequent/migrations/migrate_events.rb,
lib/sequent/core/helpers/equal_support.rb,
lib/sequent/core/helpers/param_support.rb,
lib/sequent/core/helpers/date_validator.rb,
lib/sequent/core/helpers/string_support.rb,
lib/sequent/core/helpers/array_with_type.rb,
lib/sequent/test/command_handler_helpers.rb,
lib/sequent/core/helpers/value_validators.rb,
lib/sequent/core/helpers/attribute_support.rb,
lib/sequent/core/helpers/default_validators.rb,
lib/sequent/core/helpers/date_time_validator.rb,
lib/sequent/core/transactions/no_transactions.rb,
lib/sequent/core/helpers/association_validator.rb,
lib/sequent/core/helpers/string_to_value_parsers.rb,
lib/sequent/core/helpers/type_conversion_support.rb,
lib/sequent/core/record_sessions/active_record_session.rb,
lib/sequent/core/record_sessions/replay_events_session.rb,
lib/sequent/core/transactions/active_record_transaction_provider.rb

Overview

When you need to upgrade the event store based on information of the previous schema version this is the place you need to implement a migration. Examples are: corrupt events (due to insufficient testing for instance…) or adding extra events to the event stream if a new concept is introduced.

To implement a migration you should create a class according to the following contract: module Database

class MigrateToVersionXXX
  def initialize(env)
    @env = env
  end

  def migrate
    # your migration code here...
  end
end

end

Defined Under Namespace

Modules: Core, Migrations, Test

Constant Summary collapse

VERSION =
'0.1.3'