Skip to content

Commit 683ced4

Browse files
committed
Review fixes
1 parent 2d89810 commit 683ced4

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

db/migrate/20250430125000_create_projector_states_table.rb renamed to db/migrate/20250601120000_sequent_track_projector_states.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
class CreateProjectorStatesTable < ActiveRecord::Migration[7.2]
3+
class SequentTrackProjectorStates < ActiveRecord::Migration[7.2]
44
def change
55
Sequent::Support::Database.with_search_path(Sequent.configuration.event_store_schema_name) do
66
create_table :projector_states, id: false, primary_key: :name do |t|

db/structure.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,11 +1516,11 @@ ALTER TABLE ONLY sequent_schema.snapshot_records
15161516
SET search_path TO public,view_schema,sequent_schema;
15171517

15181518
INSERT INTO "schema_migrations" (version) VALUES
1519+
('20250601120000'),
15191520
('20250512135500'),
15201521
('20250509133000'),
15211522
('20250509120000'),
15221523
('20250501120000'),
1523-
('20250430125000'),
15241524
('20250312105100'),
15251525
('20250101000001'),
15261526
('20250101000000');

lib/sequent/core/projector.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def self.replay_persistor
113113
end
114114

115115
def dispatch_message(...)
116-
super if is_active?
116+
super if active?
117117
end
118118

119119
def_delegators :@persistor, :execute_sql, :commit
@@ -199,7 +199,7 @@ def ensure_valid!
199199
end
200200
end
201201

202-
def is_active?
202+
def active?
203203
version = Sequent.migrations_class&.version
204204
return true if version.nil?
205205

lib/sequent/migrations/view_schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def migrate_offline
279279
Versions.end_offline!(Sequent.new_version)
280280
end
281281

282-
# Update all configurade projectors as active with the new version, old code can now longer apply any events
282+
# Update all configured projectors as active with the new version, old code can now longer apply any events
283283
# using any still implemented projector. Projectors that are no longer present in this version of the code
284284
# will remain activate at the older version level.
285285
Sequent.activate_current_configuration!

lib/sequent/sequent.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def self.configuration
3939

4040
def self.activate_current_configuration!
4141
configuration.event_store.register_types!
42-
migration_class&.activate_current_configuration!
42+
migrations_class&.activate_current_configuration!
4343
end
4444

4545
# Short hand for Sequent.configuration.command_service

0 commit comments

Comments
 (0)