mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-11 00:36:32 +02:00
fix database schema migration from 13 to 14
This commit is contained in:
parent
485cda52a8
commit
d41848014b
@ -15,7 +15,7 @@ public class GadgetbridgeUpdate_14 implements DBUpdateScript {
|
|||||||
public void upgradeSchema(SQLiteDatabase db) {
|
public void upgradeSchema(SQLiteDatabase db) {
|
||||||
if (!DBHelper.existsColumn(PebbleHealthActivitySampleDao.TABLENAME, PebbleHealthActivitySampleDao.Properties.HeartRate.columnName, db)) {
|
if (!DBHelper.existsColumn(PebbleHealthActivitySampleDao.TABLENAME, PebbleHealthActivitySampleDao.Properties.HeartRate.columnName, db)) {
|
||||||
String ADD_COLUMN_HEART_RATE = "ALTER TABLE " + PebbleHealthActivitySampleDao.TABLENAME + " ADD COLUMN "
|
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);
|
db.execSQL(ADD_COLUMN_HEART_RATE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user