[protobuf] Re: Handle data migration. e.g. moving of field - Java

2016-02-19 Thread 'Josh Haberman' via Protocol Buffers
Yes I think that plan is your best bet. One option is to leave the old field in your source code but comment it out, so you have a record of the field as it was previously defined. You may also want to mark the field numbers and names as "reserved":

[protobuf] Re: Handle data migration. e.g. moving of field - Java

2016-02-16 Thread Vince
I'm facing the exact same problem. Did you find any way to migrate data with PB? The only way I can think of is to keep generated code of each schema version and program the migration with that. On Thursday, May 8, 2014 at 4:39:50 PM UTC-4, Klaus Kraft wrote: > > Hi, > > so far I have defined