Skip to content

Commit 15e3ef0

Browse files
committed
Add index creation statements to MongoDB DDL script
The schema-mongodb.jsonl file was missing the index creation statements that are already defined in schema-mongodb.js. This adds the equivalent createIndexes commands for BATCH_JOB_INSTANCE, BATCH_JOB_EXECUTION, and BATCH_STEP_EXECUTION collections. Closes #5277 Signed-off-by: Meyonsoo Kim <digle117@gmail.com>
1 parent d8632a3 commit 15e3ef0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

spring-batch-core/src/main/resources/org/springframework/batch/core/schema-mongodb.jsonl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
{insert: "BATCH_SEQUENCES", documents: [ { _id: 'BATCH_JOB_INSTANCE_SEQ', count: NumberLong(0) } ]}
66
{insert: "BATCH_SEQUENCES", documents: [ { _id: 'BATCH_JOB_EXECUTION_SEQ', count: NumberLong(0) } ]}
77
{insert: "BATCH_SEQUENCES", documents: [ { _id: 'BATCH_STEP_EXECUTION_SEQ', count: NumberLong(0) } ]}
8+
{createIndexes: "BATCH_JOB_INSTANCE", indexes: [{key: {jobName: 1}, name: "job_name_idx"}, {key: {jobName: 1, jobKey: 1}, name: "job_name_key_idx"}, {key: {jobInstanceId: -1}, name: "job_instance_idx"}]}
9+
{createIndexes: "BATCH_JOB_EXECUTION", indexes: [{key: {jobInstanceId: 1}, name: "job_instance_idx"}, {key: {jobInstanceId: 1, status: 1}, name: "job_instance_status_idx"}]}
10+
{createIndexes: "BATCH_STEP_EXECUTION", indexes: [{key: {stepExecutionId: 1}, name: "step_execution_idx"}]}

0 commit comments

Comments
 (0)