It's not necessary to wrap your
SQLiteOpenHelper.onUpgrade() code in
endTransaction() pairs, because ever since the earliest version of SQLiteOpenHelper, the Android source code has done this for you:
There's a function
DatabaseUtils.queryNumEntries() which can be used to query
SELECT COUNT(*) FROM table; in a SQLite database in Android.
The Google Analytics SDK for Android v3 (Beta) does not support Android 1.5 (API version 3). When you try to call
EasyTracker.getInstance(this).activityStart(this); you will get this error:
Emily, Ryan and I attempted to hike the Tantalus-Arboretum trail the other day.
Parking was easy, free, and nearby:
One strategy to test Android sqlite database upgrades is to make a copy of your
SQLiteOpenHelper class each time you create a new database version. That way, you can use the older revisions of
SQLiteOpenHelper to create legacy versions of your database schema and make sure that when you open the database with newer versions, the upgrade works properly.
SQLite only supports a limited subset of ALTER TABLE, so to modify an existing column, it's necessary to create a separate table. The SQLite documentation recommends doing two separate INSERT/SELECT operations using a temporary table, instead of doing an INSERT/SELECT followed by an ALTER TABLE RENAME TO.