fix database schema migration from 13 to 14

This commit is contained in:
Andreas Shimokawa 2016-11-16 11:37:36 +01:00
parent 485cda52a8
commit d41848014b
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ public class GadgetbridgeUpdate_14 implements DBUpdateScript {
public void upgradeSchema(SQLiteDatabase db) {
if (!DBHelper.existsColumn(PebbleHealthActivitySampleDao.TABLENAME, PebbleHealthActivitySampleDao.Properties.HeartRate.columnName, db)) {
String ADD_COLUMN_HEART_RATE = "ALTER TABLE " + PebbleHealthActivitySampleDao.TABLENAME + " ADD COLUMN "
+ PebbleHealthActivitySampleDao.Properties.HeartRate.columnName + " INTEGER NOT NULL;";
+ PebbleHealthActivitySampleDao.Properties.HeartRate.columnName + " INTEGER NOT NULL DEFAULT 0;";
db.execSQL(ADD_COLUMN_HEART_RATE);
}
}