How did you install the Amplify CLI?
npm install --no-save @aws-amplify/cli-internal-gen2-migration-experimental-alpha
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
0.4.0
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Describe the bug
When running npx amplify gen2-migration generate the data resource sometimes looks like this:
export const data = defineData({
authorizationModes: {
defaultAuthorizationMode: "iam",
apiKeyAuthorizationMode: { expiresInDays: 7 }
},
schema
});
Its missing the migratedAmplifyGen1DynamoDbTableMappings property which tells amplify which tables should be reused for which model.
Expected behavior
Data resource should always include the mapping if an app has a GraphQL schema:
export const data = defineData({
migratedAmplifyGen1DynamoDbTableMappings: [{
//The "branchname" variable needs to be the same as your deployment branch if you want to reuse your Gen1 app tables
branchName: "main",
modelNameToTableNameMapping: { User: "User-vzljmnp34bajrbgjzq7gowln6q-main", Product: "Product-vzljmnp34bajrbgjzq7gowln6q-main", Comment: "Comment-vzljmnp34bajrbgjzq7gowln6q-main" }
}],
authorizationModes: {
defaultAuthorizationMode: "iam",
apiKeyAuthorizationMode: { expiresInDays: 7 }
},
schema
});
Reproduction steps
This behavior is sporadic and probably doesn't relate to a specific app. For me though it happened while following the migration guide of the fitness-tracker app
Project Identifier
No response
Log output
Details
# Put your logs below this line
Additional information
No response
Before submitting, please confirm:
How did you install the Amplify CLI?
npm install --no-save @aws-amplify/cli-internal-gen2-migration-experimental-alpha
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
0.4.0
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Describe the bug
When running
npx amplify gen2-migration generatethe data resource sometimes looks like this:Its missing the
migratedAmplifyGen1DynamoDbTableMappingsproperty which tells amplify which tables should be reused for which model.Expected behavior
Data resource should always include the mapping if an app has a GraphQL schema:
Reproduction steps
This behavior is sporadic and probably doesn't relate to a specific app. For me though it happened while following the migration guide of the fitness-tracker app
Project Identifier
No response
Log output
Details
Additional information
No response
Before submitting, please confirm: