Skip to content

Commit

Permalink
fix: add id-ts-index when creating job table for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smrz2001 committed Sep 11, 2023
1 parent 687b153 commit d18982a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions common/aws/ddb/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,28 @@ func (jdb *JobDatabase) createJobTable(ctx context.Context) error {
ReadCapacityUnits: aws.Int64(1),
WriteCapacityUnits: aws.Int64(1),
},
GlobalSecondaryIndexes: []types.GlobalSecondaryIndex{
{
IndexName: aws.String(idTsIndex),
KeySchema: []types.KeySchemaElement{
{
AttributeName: aws.String("id"),
KeyType: "HASH",
},
{
AttributeName: aws.String("ts"),
KeyType: "RANGE",
},
},
Projection: &types.Projection{
ProjectionType: types.ProjectionTypeAll,
},
ProvisionedThroughput: &types.ProvisionedThroughput{
ReadCapacityUnits: aws.Int64(1),
WriteCapacityUnits: aws.Int64(1),
},
},
},
}
return createTable(ctx, jdb.logger, jdb.ddbClient, &createJobTableInput)
}
Expand Down

0 comments on commit d18982a

Please sign in to comment.