Skip to content

Commit

Permalink
Cast aggregrate_id to text rather then varchar
Browse files Browse the repository at this point in the history
  • Loading branch information
lvonk committed Dec 13, 2023
1 parent e404006 commit 5faece3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sequent/migrations/view_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def event_stream(aggregate_prefixes, event_types, exclude_already_replayed)

event_stream = Sequent.configuration.event_record_class.where(event_type: event_types)
event_stream = event_stream.where(<<~SQL, aggregate_prefixes)
substring(aggregate_id::varchar from 1 for #{LENGTH_OF_SUBSTRING_INDEX_ON_AGGREGATE_ID_IN_EVENT_STORE}) in (?)
substring(aggregate_id::text from 1 for #{LENGTH_OF_SUBSTRING_INDEX_ON_AGGREGATE_ID_IN_EVENT_STORE}) in (?)
SQL
if exclude_already_replayed
event_stream = event_stream
Expand Down

0 comments on commit 5faece3

Please sign in to comment.