aws / aws-sdk-ruby-record

Official repository for the aws-record gem, an abstraction for Amazon DynamoDB.
Apache License 2.0
318 stars 41 forks source link

TableConfig Local Secondary Index #73

Closed natesalisbury closed 6 years ago

natesalisbury commented 7 years ago

Are there plans to support declaring local secondary indexes in a TableConfig?

awood45 commented 7 years ago

There are not. Local secondary indexes can only be created at table creation time, and it's considered a best practice as I understand it to move towards using global secondary indexes in new tables. However, a TableConfig for a table with existing local secondary indexes should not cause any problems.

awood45 commented 7 years ago

I'll take a note of the request though, and if it's something broadly desired, I can take a pull request for it.

natesalisbury commented 7 years ago

I didn't realize moving to GSIs is a best practice, thanks for letting me know. I just figured if the partition keys were going to be the same you would want to use a local secondary index. I'll just go with a GSI. Thanks!

awood45 commented 7 years ago

Sounds good - I'll leave this open for a bit to see if there are other requests for this before closing.