From 2e67b5c6d023d3cd4faf9baaf7d932af17d24f68 Mon Sep 17 00:00:00 2001 From: willschipp Date: Fri, 22 Mar 2013 07:50:18 -0400 Subject: [PATCH] BATCH-1977 updated insert statement to copy all the job executions for all the instances and their parameters --- .../batch/core/2.1-to-2.2-migration.sql | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/spring-batch-core/src/main/resources/org/springframework/batch/core/2.1-to-2.2-migration.sql b/spring-batch-core/src/main/resources/org/springframework/batch/core/2.1-to-2.2-migration.sql index 104ae6073..0c9d41881 100644 --- a/spring-batch-core/src/main/resources/org/springframework/batch/core/2.1-to-2.2-migration.sql +++ b/spring-batch-core/src/main/resources/org/springframework/batch/core/2.1-to-2.2-migration.sql @@ -1,18 +1,13 @@ --insert script that 'copies' existing batch_job_params to batch_job_execution_params --sets new params to identifying ones ---selects the 'first'(minimum) job_execution_id for a job_instance_id +--verified on h2, -INSERT INTO BATCH_JOB_EXECUTION_PARAMS ( - JOB_EXECUTION_ID , TYPE_CD , KEY_NAME , STRING_VAL , DATE_VAL , LONG_VAL , DOUBLE_VAL , IDENTIFYING -) SELECT ( - SELECT - MIN(JOB_EXECUTION_ID) - FROM - BATCH_JOB_EXECUTION JE, BATCH_JOB_PARAMS JP - WHERE - JP.JOB_INSTANCE_ID = JE.JOB_INSTANCE_ID AND JE.JOB_INSTANCE_ID = J.JOB_INSTANCE_ID - ), - J.TYPE_CD, J.KEY_NAME, J.STRING_VAL, J.DATE_VAL, J.LONG_VAL, J.DOUBLE_VAL, 1 +INSERT INTO BATCH_JOB_EXECUTION_PARAMS + ( JOB_EXECUTION_ID , TYPE_CD, KEY_NAME, STRING_VAL, DATE_VAL, LONG_VAL, DOUBLE_VAL, IDENTIFYING ) +SELECT + JE.JOB_EXECUTION_ID , JP.TYPE_CD , JP.KEY_NAME , JP.STRING_VAL , JP.DATE_VAL , JP.LONG_VAL , JP.DOUBLE_VAL , 1 FROM - BATCH_JOB_PARAMS J; \ No newline at end of file + BATCH_JOB_PARAMS JP,BATCH_JOB_EXECUTION JE +WHERE + JP.JOB_INSTANCE_ID = JE.JOB_INSTANCE_ID; \ No newline at end of file