GreenDAO架构更新和数据迁移? [英] GreenDAO schema update and data migration?

查看:154
本文介绍了GreenDAO架构更新和数据迁移?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我评估GreenDAO考虑在商业Android应用程序,我会努力,想确定迁移路径架构更新。

我是正确的断言,我会写一个自定义的OpenHelper而根据新的模式提供的OnUpdate(),并提取转换和存储数据?这一假设提出了各地的电话和责任划分排序一些有趣的问题。

我一直没能找到各地的架构更新和数据迁移的任何文档GreenDAO。

下面是一大堆博客文章我已经写了关于这一主题:

  1. <一个href="https://web.archive.org/web/20131108033927/http://www.androidanalyse.com/greendao-an-android-orm-for-sqlite/">Review greenDAO
  2. <一个href="https://web.archive.org/web/20140215121239/http://www.androidanalyse.com/greendao-schema-generation/">Part 1 - 架构生成
  3. <一个href="https://web.archive.org/web/20131102132942/http://www.androidanalyse.com/greendao-schema-migration/">Part 2 - 架构迁移
  4. <一个href="https://web.archive.org/web/20131102112616/http://www.androidanalyse.com/greendao-testing-migration/">Part 3 - 测试模式迁移
解决方案

您正确的假设。没有变化的今天不同的模式版本之间的跟踪。因此,你需要写doinng模式升级当SQL自己。

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.

这篇关于GreenDAO架构更新和数据迁移?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆