Hi, Jay.

I just wrote up my own method for changes like that on Stack Overflow:
http://stackoverflow.com/questions/1567148/method-to-migrate-app-engine-models

Some things I didn't mention in the answer are that you probably want
to retry your db.put()s and if you have any problems, log at the
critical level or otherwise make sure you are aware of any failed
migrations.

I am going through a very similar situation with a pretty major
change. I do not want to permanently modify my entities--just in case.
So I have created new entity names and I am keeping the old version
that works with the old entities available for fall-back just in case.

Since I am using whole new entities and a pretty severe model change,
I am looking into the deferred execution and/or taskqueue procedure
for migrating (actually converting) all of my entities ahead of time.

* http://code.google.com/appengine/articles/deferred.html
* http://code.google.com/appengine/docs/python/taskqueue/

On Oct 18, 5:00 am, Jay <[email protected]> wrote:
> Hello all. I did a little searching and did not find something on this
> explicitly. I'm sure I missed because this must have been discussed.
>
> I have an app that I am making some changes to. There is a model that
> is changing. What I want to do is change a property from
> db.BlobProperty to db.ReferenceProperty - yep, that old thing. I find
> that I can't really load any of the old data because
> appengine.ext.__init__ wants to do some validation which fails. It is
> using the new model to validate the old data. This sort of make sense,
> but it is not as pythony as I would have imagined.
>
> So, is there a way to do this? Of course, I could just add new
> attributes and do the migration that way. However, that leaves
> deprecated attributes in my model, I don't like the design. Further
> question ... let's say I did go that route. Could I later remove these
> attributes, or would the db fail them through validation?
>
> Thanks for your time and I appreciate your insight.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to