Syntax Syntax - 7 months ago 419
Android Question

GreenDAO schema update and data migration?

I'm evaluating GreenDAO for consideration in a commercial Android app I will be working on and wanted to determine the migration path for schema updates.

Am I correct in asserting that I would have to write a custom OpenHelper which provides the onUpdate() and extracts transforms and stores data according to the new schema? This assumption raises some interesting questions around ordering of calls and partitioning of responsibility.

I have not been able to find any documentation around schema update and data migration for GreenDAO.

Here are a bunch of blog articles I have written on this topic:

  1. Review of greenDAO

  2. Part 1 – Schema Generation

  3. Part 2 – Schema Migration

  4. Part 3 – Testing Schema Migration


You assumed correctly. There is no change tracking between different schema versions today. Thus you need to write SQL yourself when doinng schema upgrades.