thanks, so the onCreate gets called when the database has not been
created and the onupgrade gets called when the database has been
created, but the app is being upgraded?  Do these methods get called
due to some global variable that gets reset upon a fresh or upgraded
install of the app?

On Feb 25, 9:44 am, Mark Murphy <[email protected]> wrote:
> Dan wrote:
> > I've got a question about updating an app after release.  If I have a
> > database that contains 10 columns and I add a feature that requires an
> > 11th column after the app has been released, where would I put the sql
> > code to add the new column so that when they install the app it keeps
> > their current data, but adds that 11th column?
>
> In onUpgrade() of your SQLiteOpenHelper subclass.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

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

Reply via email to