mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-16 08:30:05 +01:00
specify the new db version at upgrade conditions
This commit is contained in:
parent
e50c4f600f
commit
7a9cabe2e8
@ -38,7 +38,8 @@ class DBHelper private constructor(private val mContext: Context) : SQLiteOpenHe
|
||||
}
|
||||
|
||||
override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
|
||||
db.execSQL("ALTER TABLE $TABLE_NAME ADD COLUMN $COL_TYPE INTEGER DEFAULT 0")
|
||||
if (newVersion == 2)
|
||||
db.execSQL("ALTER TABLE $TABLE_NAME ADD COLUMN $COL_TYPE INTEGER DEFAULT 0")
|
||||
}
|
||||
|
||||
private fun insertFirstNote(db: SQLiteDatabase) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user