mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-22 06:56:46 +01:00
add a new db column for Repeat Count
This commit is contained in:
parent
c79cce6f34
commit
bf02bb5c18
@ -38,6 +38,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
||||
private val COL_REPEAT_INTERVAL = "repeat_interval"
|
||||
private val COL_REPEAT_RULE = "repeat_rule"
|
||||
private val COL_REPEAT_LIMIT = "repeat_limit"
|
||||
private val COL_REPEAT_COUNT = "repeat_count"
|
||||
|
||||
private val TYPES_TABLE_NAME = "event_types"
|
||||
private val COL_TYPE_ID = "event_type_id"
|
||||
@ -119,13 +120,14 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
||||
|
||||
if (oldVersion < 11) {
|
||||
db.execSQL("ALTER TABLE $META_TABLE_NAME ADD COLUMN $COL_REPEAT_RULE INTEGER NOT NULL DEFAULT 0")
|
||||
db.execSQL("ALTER TABLE $META_TABLE_NAME ADD COLUMN $COL_REPEAT_COUNT INTEGER NOT NULL DEFAULT 0")
|
||||
setupRepeatRules(db)
|
||||
}
|
||||
}
|
||||
|
||||
private fun createMetaTable(db: SQLiteDatabase) {
|
||||
db.execSQL("CREATE TABLE $META_TABLE_NAME ($COL_ID INTEGER PRIMARY KEY, $COL_EVENT_ID INTEGER UNIQUE, $COL_REPEAT_START INTEGER, " +
|
||||
"$COL_REPEAT_INTERVAL INTEGER, $COL_REPEAT_LIMIT INTEGER, $COL_REPEAT_RULE INTEGER)")
|
||||
"$COL_REPEAT_INTERVAL INTEGER, $COL_REPEAT_LIMIT INTEGER, $COL_REPEAT_RULE INTEGER, $COL_REPEAT_COUNT INTEGER)")
|
||||
}
|
||||
|
||||
private fun createTypesTable(db: SQLiteDatabase) {
|
||||
|
Loading…
Reference in New Issue
Block a user