From 5faece380c13521adb55ec92f15b560dd7eb127a Mon Sep 17 00:00:00 2001 From: Lars Vonk Date: Wed, 13 Dec 2023 13:14:40 +0100 Subject: [PATCH] Cast aggregrate_id to text rather then varchar --- lib/sequent/migrations/view_schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sequent/migrations/view_schema.rb b/lib/sequent/migrations/view_schema.rb index 297078bb..37c27590 100644 --- a/lib/sequent/migrations/view_schema.rb +++ b/lib/sequent/migrations/view_schema.rb @@ -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