Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66908 > unrolled thread
| Started by | glenn.a.isaac@gmail.com |
|---|---|
| First post | 2014-02-22 16:39 -0800 |
| Last post | 2014-02-23 09:56 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.python
Google app engine database glenn.a.isaac@gmail.com - 2014-02-22 16:39 -0800
Re: Google app engine database Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-23 00:57 +0000
Re: Google app engine database Kev Dwyer <kevin.p.dwyer@gmail.com> - 2014-02-23 09:56 +0000
| From | glenn.a.isaac@gmail.com |
|---|---|
| Date | 2014-02-22 16:39 -0800 |
| Subject | Google app engine database |
| Message-ID | <b4502425-ecf6-4151-b19a-a06f459c8fd0@googlegroups.com> |
Is there a way to make sure that whenever you're making google engine app iterations to a database that that info does not get wiped/deleted. Please advise
[toc] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-02-23 00:57 +0000 |
| Message-ID | <mailman.7269.1393117055.18130.python-list@python.org> |
| In reply to | #66908 |
On 23/02/2014 00:39, glenn.a.isaac@gmail.com wrote: > Is there a way to make sure that whenever you're making google engine app iterations to a database that that info does not get wiped/deleted. Please advise > What Python code have you tried or are you contemplating using? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
[toc] | [prev] | [next] | [standalone]
| From | Kev Dwyer <kevin.p.dwyer@gmail.com> |
|---|---|
| Date | 2014-02-23 09:56 +0000 |
| Message-ID | <mailman.7284.1393149430.18130.python-list@python.org> |
| In reply to | #66908 |
glenn.a.isaac@gmail.com wrote: > Is there a way to make sure that whenever you're making google engine app > iterations to a database that that info does not get wiped/deleted. > Please advise It's not clear what you mean here; I'll guess that by "iterations" you mean "changes" by "database" you mean the db or ndb datastore and by "info" you mean "data stored in the datastore". Apologies if this isn't so. Appengine doesn't document any migration utilities to handle changes in your datastore schema, so you need to manage the effects of such changes yourself. To ensure that you do not lose data when changing your model code, avoid making destructive changes to your models, i.e. - don't delete properties from a model - don't rename properties on a model If you must make these changes for some reason, you'll need to migrate the data somehow. In my experience with Appengine, data is not actaully lost if you make destructive changes to your models, it becomes inaccessible becuae the property names it was stored under no longer exist on the model. In theory you could access the data by adding the proprties back to the model or (maybe) by loading a different model definition in the remote shell, but this is not something that you would want to rely on in a production environment. tl,dr: it's ok to add new properties to you models, but don't remove or rename properties. Hope that helps, Kev
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web