Skip to content

Commit

Permalink
fix: wrong encoding on a migration
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Jan 15, 2025
1 parent 1f4043b commit fe38474
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ begin
case
when previousHash is null
then marshalledAsJSON::bytea
else '"' || encode(previousHash::bytea, 'base64')::bytea || E'"\n' || convert_to(marshalledAsJSON, 'LATIN1')::bytea
else '"' || encode(previousHash::bytea, 'base64')::bytea || E'"\n' || convert_to(marshalledAsJSON, 'UTF-8')::bytea
end || E'\n', 'sha256'::text
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ do $$
limit _batch_size
)
update logs
set memento = convert_to(data::varchar, 'LATIN1')::bytea
set memento = convert_to(data::varchar, 'UTF-8')::bytea
from _outdated_logs
where logs.seq in (_outdated_logs.seq);

Expand Down

0 comments on commit fe38474

Please sign in to comment.