From 521eeb6b1923010b84d96e2b03ab6794a4835e4a Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 12 Jul 2017 23:03:39 +0200 Subject: [PATCH] catch exceptions thrown at adding a new column to exceptions table --- .../com/simplemobiletools/calendar/helpers/DBHelper.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt index 26a834b9a..c9ad934da 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt @@ -139,7 +139,10 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont createExceptionsTable(db) } catch (ignored: SQLiteException) { } - db.execSQL("ALTER TABLE $EXCEPTIONS_TABLE_NAME ADD COLUMN $COL_CHILD_EVENT_ID INTEGER NOT NULL DEFAULT 0") + try { + db.execSQL("ALTER TABLE $EXCEPTIONS_TABLE_NAME ADD COLUMN $COL_CHILD_EVENT_ID INTEGER NOT NULL DEFAULT 0") + } catch (ignored: SQLiteException) { + } } }