Skip to content

Conversation

@boostchicken
Copy link
Owner

No description provided.

A new property is introduced to automatically handle table creation (Key columns + GSIs):
`spring.data.dynamodb.entity2ddl.auto`

That can be any of the following settings
* `none` - The default. No action performed
* `create-only` - Tables are created on Spring startup if table doesn't exist
* `drop` - Tables are dropped on Spring context shutdown
* `create` - Tables are dropped & created on Spring startup
* `create-drop` - Tables are dropped & created on Spring startup and dropped on shutdown
* `validate` - The existing tables are checked to exist - otherwise an Exception is generated on Spring context startup

There are additional settings for the creation of tables:

`spring.data.dynamodb.entity2ddl.gsiProjectionType`: The projection type for the GSIs
* `ALL`
* `KEYS_ONLY`
* `INCLUDE`

Please consult `com.amazonaws.services.dynamodbv2.model.ProjectionType`

`spring.data.dynamodb.entity2ddl.readCapacity` (default `10`): The read capacity for the GSIs & the table itself
`spring.data.dynamodb.entity2ddl.writeCapacity` (default `1`): The write capacity for the GSIs & the table itself

To achieve this, some substantial refactoring was required as a lot of objects were created outside of the Spring context.
All changes should be backward compatible and not change any semantic but if anything is broken - please report!
Issue #17 - Create table when not exist
describing in detail snapshot access
@boostchicken boostchicken merged commit 42aca61 into boostchicken:spring-data-moore Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants