From 5dbd03d89e278633570fdba1586af3a20bbc65af Mon Sep 17 00:00:00 2001 From: himeshr Date: Wed, 18 Dec 2024 14:49:25 +0530 Subject: [PATCH] avniproject/avni-server#813 | Update batch_job_execution_params.parameter_type values to resolve conversion issues --- .../V1_347_2__ModifyTypSpringBchUpdTo5.sql | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 avni-server-api/src/main/resources/db/migration/V1_347_2__ModifyTypSpringBchUpdTo5.sql diff --git a/avni-server-api/src/main/resources/db/migration/V1_347_2__ModifyTypSpringBchUpdTo5.sql b/avni-server-api/src/main/resources/db/migration/V1_347_2__ModifyTypSpringBchUpdTo5.sql new file mode 100644 index 000000000..8f0c459bd --- /dev/null +++ b/avni-server-api/src/main/resources/db/migration/V1_347_2__ModifyTypSpringBchUpdTo5.sql @@ -0,0 +1,25 @@ +DO +$$ + BEGIN + IF EXISTS + (SELECT 1 + FROM information_schema.tables + WHERE table_schema = 'public' + AND table_name = 'batch_job_execution_params' + ) + THEN + UPDATE batch_job_execution_params bjep + set parameter_type = 'java.util.Date' + where parameter_type = 'DATE'; + UPDATE batch_job_execution_params bjep + set parameter_type = 'java.lang.Long' + where parameter_type = 'LONG'; + UPDATE batch_job_execution_params bjep + set parameter_type = 'java.lang.Double' + where parameter_type = 'DOUBLE'; + UPDATE batch_job_execution_params bjep + set parameter_type = 'java.lang.String' + where parameter_type = 'STRING'; + END IF; + END +$$;