From b514cb06dce3b00f913036294844b6aa37a18ffd Mon Sep 17 00:00:00 2001 From: Gael Leblan Date: Thu, 21 Nov 2024 14:16:17 +0100 Subject: [PATCH] [backend] Upgrading to latest spring boot version --- ..._functions.java => V3_49__Adding_wrapper_functions.java} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename openbas-api/src/main/java/io/openbas/migration/{V3_48__Adding_wrapper_functions.java => V3_49__Adding_wrapper_functions.java} (77%) diff --git a/openbas-api/src/main/java/io/openbas/migration/V3_48__Adding_wrapper_functions.java b/openbas-api/src/main/java/io/openbas/migration/V3_49__Adding_wrapper_functions.java similarity index 77% rename from openbas-api/src/main/java/io/openbas/migration/V3_48__Adding_wrapper_functions.java rename to openbas-api/src/main/java/io/openbas/migration/V3_49__Adding_wrapper_functions.java index d0754ef3f5..7210df4f9f 100644 --- a/openbas-api/src/main/java/io/openbas/migration/V3_48__Adding_wrapper_functions.java +++ b/openbas-api/src/main/java/io/openbas/migration/V3_49__Adding_wrapper_functions.java @@ -7,14 +7,14 @@ import org.springframework.stereotype.Component; @Component -public class V3_48__Adding_wrapper_functions extends BaseJavaMigration { +public class V3_49__Adding_wrapper_functions extends BaseJavaMigration { @Override public void migrate(Context context) throws SQLException { Statement migrator = context.getConnection().createStatement(); migrator.execute( """ - CREATE FUNCTION array_to_string_wrapper(a anyelement, b text) + CREATE OR REPLACE FUNCTION array_to_string_wrapper(a anyelement, b text) RETURNS TEXT AS $$ SELECT array_to_string(a, b) @@ -22,7 +22,7 @@ SELECT array_to_string(a, b) """); migrator.execute( """ - CREATE FUNCTION array_position_wrapper(a anyelement, b text) + CREATE OR REPLACE FUNCTION array_position_wrapper(a anyelement, b text) RETURNS INT AS $$ SELECT array_position(a, b)