Skip to content

Commit

Permalink
fix(migrations): use double question-mark (#19557)
Browse files Browse the repository at this point in the history
Use double question mark to escape parametrization by jdbi.
https://jdbc.postgresql.org/documentation/query/#using-the-statement-or-preparedstatement-interface

(cherry picked from commit 76c9b5a)
  • Loading branch information
sushi30 authored and mohityadav766 committed Jan 28, 2025
1 parent 2822329 commit 5203092
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- Add constraint to apps_data_store
ALTER TABLE apps_data_store ADD CONSTRAINT entity_relationship_pky PRIMARY KEY (identifier, type);
UPDATE user_entity SET json = jsonb_set(json::jsonb, '{isBot}', 'false'::jsonb, true) WHERE NOT (json ? 'isBot');
UPDATE user_entity SET json = jsonb_set(json::jsonb, '{isBot}', 'false'::jsonb, true) WHERE NOT (json ?? 'isBot');
ALTER TABLE user_entity ADD COLUMN isBot BOOLEAN GENERATED ALWAYS AS ((json ->> 'deleted')::boolean) STORED NOT NULL;
CREATE INDEX idx_isBot ON user_entity (isBot);

0 comments on commit 5203092

Please sign in to comment.