# Behave cleanly if there is no "turbot" table at all yet.
try:
response = turb.table.scan(
- IndexName="hunt_id_index",
+ IndexName="is_hunt_index",
)
hunts = response['Items']
except Exception:
{'AttributeName': 'PK', 'AttributeType': 'S'},
{'AttributeName': 'SK', 'AttributeType': 'S'},
{'AttributeName': 'channel_id', 'AttributeType': 'S'},
- {'AttributeName': 'hunt_id', 'AttributeType': 'S'},
+ {'AttributeName': 'is_hunt', 'AttributeType': 'S'},
],
ProvisionedThroughput={
'ReadCapacityUnits': 5,
}
},
{
- 'IndexName': 'hunt_id_index',
+ 'IndexName': 'is_hunt_index',
'KeySchema': [
- {'AttributeName': 'hunt_id', 'KeyType': 'HASH'}
+ {'AttributeName': 'is_hunt', 'KeyType': 'HASH'}
],
'Projection': {
'ProjectionType': 'ALL'
item={
"PK": "hunt-{}".format(hunt_id),
"SK": "hunt-{}".format(hunt_id),
+ "is_hunt": hunt_id,
"hunt_id": hunt_id,
"channel_id": channel_id,
"active": False,