Skip to content

Commit

Permalink
Merge pull request #402 from zilverline/cast-to-text-rather-then-varchar
Browse files Browse the repository at this point in the history
Cast aggregrate_id to text rather then varchar
  • Loading branch information
lvonk authored Dec 13, 2023
2 parents e404006 + 5faece3 commit 764ee9d
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 764ee9d

Please sign in to comment.