Let's say you design your App Engine Model classes a particular way, you put your code into production and allow users to interact with your app for a while, generating data into the App Engine datastore.
Now, let's say you decide to make a change to one of your Model classes.
Is there a recommended process for doing this - in my case in a Java app - so that when the new code is put into production, it doesn't causing the app to break while running against the pre-existing data which has the old schema?
For example, should you download your production data and test against it before uploading any new code to production?
What are the best practices for this type of issue?
One approach, if your schema change allows for it, is to delay making the version that requires the schema change default until the schema change is done.
Upload the new version, let it sit for a while while indexes are updated, and then run a mapreduce to touch (and migrate) any entities that need to be updated. When that's done, make the new version default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With