Dynamoose: Error adding Global Index on existing table.

Created on 26 Oct 2017  路  4Comments  路  Source: dynamoose/dynamoose

Hi. Thank you for developing such a wonderful library.

I have a existing model and production deployment on AWS. Due to updates on the application, I have to add Global Index to the existing table which is needed for the updates but I cannot due to an error:

Error: indexes are not synchronized and update flag is set to false

Now the application is not working at all because of the error.

Please help me to solve the problem ASAP.
Thanks

All 4 comments

You'll need to either manually update the table in AWS to match the new Schema or allow Dynamoose to update it for you:

dynamoose.model(name, schema, {update: true})

Hi

I would suggest in production, set this update flag to false. This will not allow the app to accidentally try to sync the index and table structure and further separate the infrastructure from the app.

Cheers

@lrcry -- good recommendation -- probably should add a production recommendations to the documentation page.

Due to the default of update being false, I don't see the need for a documentation change here. At least not an urgent matter. Might be done with a documentation rewrite.

Closing for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mcalhoun picture mcalhoun  路  6Comments

chasevida picture chasevida  路  3Comments

mogwai picture mogwai  路  5Comments

MickL picture MickL  路  6Comments

arifsetyawan picture arifsetyawan  路  8Comments