From 52030922284df9c651fd10d32e7876a26d2f893a Mon Sep 17 00:00:00 2001 From: Imri Paran Date: Tue, 28 Jan 2025 13:37:23 +0100 Subject: [PATCH] fix(migrations): use double question-mark (#19557) 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 76c9b5a0aefc7ce1dd2ce4e2862b77cca4bdec80) --- .../sql/migrations/native/1.6.3/postgres/schemaChanges.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/sql/migrations/native/1.6.3/postgres/schemaChanges.sql b/bootstrap/sql/migrations/native/1.6.3/postgres/schemaChanges.sql index b8a8f413fc01..af2c924354dc 100644 --- a/bootstrap/sql/migrations/native/1.6.3/postgres/schemaChanges.sql +++ b/bootstrap/sql/migrations/native/1.6.3/postgres/schemaChanges.sql @@ -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); \ No newline at end of file