How do you combine existing production data with schema changes in App Engine?

Suppose you design classes for the App Engine model in a specific way, you create your own code and allow users to interact with your application for a while, generating data in the App Engine data store.

Now suppose you decide to make changes to one of your Model classes.

Is there a recommended process for this - in my case in a Java application - so that when the new code is put into production, it will not cause the application to crash while working with pre-existing data, the old scheme?

For example, should production data be loaded and tested before any new code is loaded into production?

What are the best methods for this type of problem?

+5
source share
1 answer

One approach, if this allows you to change the schema, is to delay the creation of a version that requires changing the default schema until the schema is modified.

Download the new version, let it sit for a while until the indexes are updated, and then run mapreduce to touch (and transfer) any objects that need to be updated. After that make the new version by default.

+2
source

All Articles