Question

What is the best approach to separate the data from the debug version and the live one?

The question and answers here describe how to separate the code logic: https://stackoverflow.com/a/8550105/129202

Still the datastore data is shared between all versions.

I imagine any of these:

  • some nice setting in the dashboard that would automatically separate all data between versions, so they are completely ignorant of each other. No changes needed in code, unless you expect versions to share data :-P
  • get version number in code and use that to "physically" organize data, ie putting all data in subfolders/subkeys per version... I'm not very experienced with the datastore yet and don't know if this would have a significant impact on performance.
Was it helpful?

Solution

You can't seperate data based on versions.

You could use name space, but I wouldn't

I would use a different instance and copy the production data to that instance, then run all your testing there, with complete confidence you are working with a separate data set.

Some of my projects, data is very specific to companies/users and we set up test companies and test users, but that approach is very dependent on the types of updates, and how segmented your data is. If you have multi-tenant data then you will probably already be using namespaces.

OTHER TIPS

You could use namespaces, when storing data in the Datastore, see this Google doc for more information. One for live and one for debug, and have this defined in the app.yaml for each version as an environmental variable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top