Skip to content

Commit

Permalink
handle database upgrades more gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
newhinton committed Mar 2, 2024
1 parent ea1f139 commit 042c865
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class DatabaseInfo{
val SCHEDULE_SUN= "schedule_active_sun"

val SQL_CREATE_ENTRIES =
"CREATE TABLE ${SCHEDULE_TABLE} (" +
"CREATE TABLE IF NOT EXISTS ${SCHEDULE_TABLE} (" +
"${SCHEDULE_ID} INTEGER PRIMARY KEY," +
"${SCHEDULE_START} LONG," +
"${SCHEDULE_END} LONG," +
Expand All @@ -72,7 +72,7 @@ class DatabaseInfo{
val WIFI_SSID= "wifi_ssid"

val SQL_CREATE_ENTRIES_WIFI =
"CREATE TABLE ${WIFI_TABLE} (" +
"CREATE TABLE IF NOT EXISTS ${WIFI_TABLE} (" +
"${WIFI_ID} INTEGER PRIMARY KEY," +
"${WIFI_SSID} TEXT," +
"${WIFI_TYPE} INT," +
Expand All @@ -85,7 +85,7 @@ class DatabaseInfo{
val CALENDAR_NAME= "calendar_name"

val SQL_CREATE_ENTRIES_CALENDAR =
"CREATE TABLE ${CALENDAR_TABLE} (" +
"CREATE TABLE IF NOT EXISTS ${CALENDAR_TABLE} (" +
"${CALENDAR_ID} INTEGER PRIMARY KEY," +
"${CALENDAR_ANDROID_ID} INTEGER," +
"${CALENDAR_VOL_MODE} INT)"
Expand All @@ -100,7 +100,7 @@ class DatabaseInfo{
val KEYWORD_CALENDAR= "KEYWORD_CALENDAR"

val SQL_CREATE_ENTRIES_KEYWORD =
"CREATE TABLE $KEYWORD_TABLE (" +
"CREATE TABLE IF NOT EXISTS $KEYWORD_TABLE (" +
"$KEYWORD_ID INTEGER PRIMARY KEY," +
"$KEYWORD_KEYWORD TEXT," +
"$KEYWORD_CALENDAR INT," +
Expand All @@ -112,7 +112,7 @@ class DatabaseInfo{
val BLUETOOTH_VOL_MODE= "BLUETOOTH_VOL_MODE"

val SQL_CREATE_ENTRIES_BLUETOOTH =
"CREATE TABLE $BLUETOOTH_TABLE (" +
"CREATE TABLE IF NOT EXISTS $BLUETOOTH_TABLE (" +
"$BLUETOOTH_MAC TEXT PRIMARY KEY," +
"$BLUETOOTH_VOL_MODE INT)"
}
Expand Down

0 comments on commit 042c865

Please sign in to comment.