mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
Remove helper version variable from DBHelper migration code
This commit is contained in:
@@ -49,10 +49,8 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
||||
}
|
||||
|
||||
override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
|
||||
var version = oldVersion
|
||||
if (version == 1 && newVersion > version) {
|
||||
if (oldVersion == 1 && newVersion > oldVersion) {
|
||||
db.execSQL("ALTER TABLE $ALARMS_TABLE_NAME ADD COLUMN $COL_ONE_SHOT INTEGER NOT NULL DEFAULT 0")
|
||||
version++
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user