Fix column type.

This commit is contained in:
Johannes Mockenhaupt 2018-06-23 00:28:34 +02:00
parent aab171932c
commit 53b9d5cae3
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 3 additions and 3 deletions

View file

@ -122,7 +122,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
createRowIfNotExists(getDaoBgReadings(), DatabaseHelper.DATABASE_BGREADINGS,
"filtered", "integer");
createRowIfNotExists(getDaoBgReadings(), DatabaseHelper.DATABASE_BGREADINGS,
"sourcePlugin", "integer");
"sourcePlugin", "text");
} catch (SQLException 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) {
try {
dao.executeRaw("ALTER TABLE `" + table + "` ADD CoLUMN `" + name + " " + type);
dao.executeRaw("ALTER TABLE `" + table + "` ADD COLUMN `" + name + " " + type);
} catch (SQLException e) {
// row already exists
}

View file

@ -180,7 +180,7 @@ public class CommandQueue {
if (type == Command.CommandType.SMB_BOLUS) {
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;
}
if (detailedBolusInfo.lastKnownBolusTime < TreatmentsPlugin.getPlugin().getLastBolusTime()) {