avoid updating Types db table if it was just created
This commit is contained in:
parent
ab8cbf7726
commit
d343e8211f
|
@ -160,11 +160,11 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
|||
db.execSQL("ALTER TABLE $MAIN_TABLE_NAME ADD COLUMN $COL_EVENT_SOURCE TEXT DEFAULT ''")
|
||||
}
|
||||
|
||||
if (oldVersion < 16) {
|
||||
if (oldVersion in 7..15) {
|
||||
db.execSQL("ALTER TABLE $TYPES_TABLE_NAME ADD COLUMN $COL_TYPE_CALDAV_CALENDAR_ID INTEGER NOT NULL DEFAULT 0")
|
||||
}
|
||||
|
||||
if (oldVersion < 17) {
|
||||
if (oldVersion in 7..17) {
|
||||
db.execSQL("ALTER TABLE $TYPES_TABLE_NAME ADD COLUMN $COL_TYPE_CALDAV_DISPLAY_NAME TEXT DEFAULT ''")
|
||||
db.execSQL("ALTER TABLE $TYPES_TABLE_NAME ADD COLUMN $COL_TYPE_CALDAV_EMAIL TEXT DEFAULT ''")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue