From d41848014b3de40befaa8d476da809f559983034 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Wed, 16 Nov 2016 11:37:36 +0100 Subject: [PATCH] fix database schema migration from 13 to 14 --- .../gadgetbridge/database/schema/GadgetbridgeUpdate_14.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/schema/GadgetbridgeUpdate_14.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/schema/GadgetbridgeUpdate_14.java index 57222047..f7c64ebe 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/schema/GadgetbridgeUpdate_14.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/schema/GadgetbridgeUpdate_14.java @@ -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); } }