Fix sqlite exception

This commit is contained in:
Vitaliy 2019-02-02 17:16:42 +02:00 committed by GitHub
parent 6fd476f262
commit 8388f00f7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,7 +116,7 @@ class LocationMessages(val app: TelegramApplication) {
override fun onCreate(db: SQLiteDatabase) {
db.execSQL(TIMELINE_TABLE_CREATE)
db.execSQL("CREATE INDEX $DATE_INDEX ON $TIMELINE_TABLE_NAME (\"$COL_TIME\" DESC);")
db.execSQL("CREATE INDEX IF NOT EXISTS $DATE_INDEX ON $TIMELINE_TABLE_NAME (\"$COL_TIME\" DESC);")
db.execSQL(BUFFER_TABLE_CREATE)
}
@ -510,4 +510,4 @@ class LocationMessages(val app: TelegramApplication) {
const val TYPE_BOT_BOTH = 5
const val TYPE_MY_LOCATION = 6
}
}
}