Merge pull request #2817 from bblommers/dynamodb_add_index_status
DynamoDB - Add status to Global Indexes
This commit is contained in:
commit
78f5541953
@ -682,6 +682,10 @@ class Table(BaseModel):
|
||||
self.throughput["NumberOfDecreasesToday"] = 0
|
||||
self.indexes = indexes
|
||||
self.global_indexes = global_indexes if global_indexes else []
|
||||
for index in self.global_indexes:
|
||||
index[
|
||||
"IndexStatus"
|
||||
] = "ACTIVE" # One of 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'
|
||||
self.created_at = datetime.datetime.utcnow()
|
||||
self.items = defaultdict(dict)
|
||||
self.table_arn = self._generate_arn(table_name)
|
||||
|
@ -574,6 +574,7 @@ def test_create_with_global_indexes():
|
||||
"ReadCapacityUnits": 6,
|
||||
"WriteCapacityUnits": 1,
|
||||
},
|
||||
"IndexStatus": "ACTIVE",
|
||||
}
|
||||
]
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user