Hi,

The documentation does not make the interation between onUpgrade() and
onCreate() clear.

When implementing onCreate() should this create the database at
version 1, assuming that onUpgrade will apply all of the patches to
bring it up to version x (lets say version 5 for example)? Or should
onCreate build the latest version of the database, and onUpgrade is
only used to upgrade legacy clients.

I kind of prefer the first, because it effectively means that the same
SQL is executed for everybody. Whereas the second options means that
there is a potential for onCreate to build something slightly
different to the succession of patches built by onUpgrade.

I can always make onCreate call into onUpgrade, however, this is the
kind of implementation detail that should go into the javadocs...
please update!

Thanks

Martin

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to