Appengine convert a field of type "String" to "Text" after saving several items?
So Here is the problem, I've created an entity with a field of type "String" made several of those items and now realise I need more room and therefore need to convert that field to "Text". I tried the null trick but that isn't one of the options. Any 开发者_运维问答ideas?
I don't know what "null trick" you're referring to, or why it "isn't one of the options". In general, the only difference between String and Text is whether they're indexed; you should be able to change the type, and existing entities will load normally. When they're saved again, they will be unindexed.
You'll probably have to create a new field in the object and migrate the existing objects over to use this new field.
You can do this by either migrating to the new field each time the object is fetched, and/or by having an offline task fetch some objects and migrate them, etc. If you don't have many objects, you might as well do them in an offline migrating task.
精彩评论