fix duplicate column crash when upgrading

This commit is contained in:
Eric House 2014-02-05 19:34:42 -08:00
parent 18f31ad9d6
commit ca57da44c6

View file

@ -225,7 +225,10 @@ public class DBHelper extends SQLiteOpenHelper {
setColumnsEqual( db, TABLE_NAME_SUM, VISID, "rowid" );
makeAutoincrement( db, TABLE_NAME_SUM, s_summaryColsAndTypes );
case 17:
addSumColumn( db, THUMBNAIL );
if ( 17 == oldVersion ) {
// THUMBNAIL also added by makeAutoincrement above
addSumColumn( db, THUMBNAIL );
}
case 18:
createStudyTable( db );
break;