Hi (this is my first post on StackOverflow :),
every time i increase my database version and push the upgraded app to the users, something weird happens.. For some it works perfectly fine, and some report crashes (including through the Market's reporting system) caused by the lack of table columns i just added in onUpgrade.
If you want to see the method: http://code.google.com/p/tag-todo-list/source/browse/trunk/Donut/src/com/android/todo/data/ToDoDB.java#136
I can't spot any exceptions that appear in onUpgrade. What i'm currently doing to bypass these problems is intercepting the exceptions where the new fields are invoked for the first time and then calling onUpgrade 'manually', which is kind of dirty.
Also, the app sometimes generates a 'no such table' SQLiteException when accessing the main table (again, only for some users) which is incredibly strange... Does someone know why these things happen? Or can you spot something wrong in my code?
Thanks, Teo