Publishing update with no db changes
I'm pretty sure I understand this correctly, but want to verify and see if I'm missing anything before publishing an update in the An开发者_StackOverflow中文版droid Market.
Version 1 (active in the market) creates and manipulates a local sqlite db.
Version 1.1 does nothing different in regards to the db - my ultimate goal is to reuse the db from version 1 (structure and data).
My understanding is that updates will perform whatever is in onUpgrade
, assuming the database version has changed.
So if version 1.1 uses the same value for the db version number:
private static final int DATABASE_VERSION = 1;
..then the database from version 1 will maintained and reused in 1.1?
You're right. If the database version is the same the onUpgrade
method is not executed.
精彩评论