DynamoDB schema updates with AWS Amplify
up vote
1
down vote
favorite
According to the AWS Amplify documentation:
- "objects annotated with @model are stored in Amazon DynamoDB";
- "a single @model directive configures ... an Amazon DynamoDB table"; and
- one can "push updated changes with
amplify push
".
It seems clear that amplify push
creates a DynamoDB table for each @model.
My questions relate to schema updates:
I imagine that adding/removing a model or adding/removing a field in a model works by updating the schema document and then running
amplify push
. Is that right?How does one rename a model or a field? How would
amplify push
know to rename vs. drop the old and add the new?How does one implement a migration that requires some business logic, e.g., to update the contents of existing rows? Doing this without Amplify has already been addressed but it is unclear whether that would conflict with something that
amplify push
might try to do.
amazon-web-services amazon-dynamodb graphql database-migration aws-amplify
add a comment |
up vote
1
down vote
favorite
According to the AWS Amplify documentation:
- "objects annotated with @model are stored in Amazon DynamoDB";
- "a single @model directive configures ... an Amazon DynamoDB table"; and
- one can "push updated changes with
amplify push
".
It seems clear that amplify push
creates a DynamoDB table for each @model.
My questions relate to schema updates:
I imagine that adding/removing a model or adding/removing a field in a model works by updating the schema document and then running
amplify push
. Is that right?How does one rename a model or a field? How would
amplify push
know to rename vs. drop the old and add the new?How does one implement a migration that requires some business logic, e.g., to update the contents of existing rows? Doing this without Amplify has already been addressed but it is unclear whether that would conflict with something that
amplify push
might try to do.
amazon-web-services amazon-dynamodb graphql database-migration aws-amplify
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
According to the AWS Amplify documentation:
- "objects annotated with @model are stored in Amazon DynamoDB";
- "a single @model directive configures ... an Amazon DynamoDB table"; and
- one can "push updated changes with
amplify push
".
It seems clear that amplify push
creates a DynamoDB table for each @model.
My questions relate to schema updates:
I imagine that adding/removing a model or adding/removing a field in a model works by updating the schema document and then running
amplify push
. Is that right?How does one rename a model or a field? How would
amplify push
know to rename vs. drop the old and add the new?How does one implement a migration that requires some business logic, e.g., to update the contents of existing rows? Doing this without Amplify has already been addressed but it is unclear whether that would conflict with something that
amplify push
might try to do.
amazon-web-services amazon-dynamodb graphql database-migration aws-amplify
According to the AWS Amplify documentation:
- "objects annotated with @model are stored in Amazon DynamoDB";
- "a single @model directive configures ... an Amazon DynamoDB table"; and
- one can "push updated changes with
amplify push
".
It seems clear that amplify push
creates a DynamoDB table for each @model.
My questions relate to schema updates:
I imagine that adding/removing a model or adding/removing a field in a model works by updating the schema document and then running
amplify push
. Is that right?How does one rename a model or a field? How would
amplify push
know to rename vs. drop the old and add the new?How does one implement a migration that requires some business logic, e.g., to update the contents of existing rows? Doing this without Amplify has already been addressed but it is unclear whether that would conflict with something that
amplify push
might try to do.
amazon-web-services amazon-dynamodb graphql database-migration aws-amplify
amazon-web-services amazon-dynamodb graphql database-migration aws-amplify
asked yesterday
kkurian
1,99032236
1,99032236
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53372696%2fdynamodb-schema-updates-with-aws-amplify%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown