Fix column type.
This commit is contained in:
parent
aab171932c
commit
53b9d5cae3
2 changed files with 3 additions and 3 deletions
|
@ -122,7 +122,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
createRowIfNotExists(getDaoBgReadings(), DatabaseHelper.DATABASE_BGREADINGS,
|
createRowIfNotExists(getDaoBgReadings(), DatabaseHelper.DATABASE_BGREADINGS,
|
||||||
"filtered", "integer");
|
"filtered", "integer");
|
||||||
createRowIfNotExists(getDaoBgReadings(), DatabaseHelper.DATABASE_BGREADINGS,
|
createRowIfNotExists(getDaoBgReadings(), DatabaseHelper.DATABASE_BGREADINGS,
|
||||||
"sourcePlugin", "integer");
|
"sourcePlugin", "text");
|
||||||
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
log.error("Can't create database", e);
|
log.error("Can't create database", e);
|
||||||
|
@ -132,7 +132,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
|
|
||||||
private void createRowIfNotExists(Dao dao, String table, String name, String type) {
|
private void createRowIfNotExists(Dao dao, String table, String name, String type) {
|
||||||
try {
|
try {
|
||||||
dao.executeRaw("ALTER TABLE `" + table + "` ADD CoLUMN `" + name + " " + type);
|
dao.executeRaw("ALTER TABLE `" + table + "` ADD COLUMN `" + name + " " + type);
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
// row already exists
|
// row already exists
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,7 +180,7 @@ public class CommandQueue {
|
||||||
|
|
||||||
if (type == Command.CommandType.SMB_BOLUS) {
|
if (type == Command.CommandType.SMB_BOLUS) {
|
||||||
if (isRunning(Command.CommandType.BOLUS) || bolusInQueue()) {
|
if (isRunning(Command.CommandType.BOLUS) || bolusInQueue()) {
|
||||||
log.debug("Rejecting SMB since a bolus is queue/running");
|
log.debug("Rejecting SMB since a bolus is queued/running");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (detailedBolusInfo.lastKnownBolusTime < TreatmentsPlugin.getPlugin().getLastBolusTime()) {
|
if (detailedBolusInfo.lastKnownBolusTime < TreatmentsPlugin.getPlugin().getLastBolusTime()) {
|
||||||
|
|
Loading…
Reference in a new issue