Fix method name.
This commit is contained in:
parent
eac1d5ffdb
commit
069f0fb7b1
1 changed files with 3 additions and 4 deletions
|
@ -28,7 +28,6 @@ import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import info.nightscout.androidaps.Config;
|
import info.nightscout.androidaps.Config;
|
||||||
import info.nightscout.androidaps.Constants;
|
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.data.Profile;
|
import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.data.ProfileStore;
|
import info.nightscout.androidaps.data.ProfileStore;
|
||||||
|
@ -119,9 +118,9 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
TableUtils.createTableIfNotExists(connectionSource, TDD.class);
|
TableUtils.createTableIfNotExists(connectionSource, TDD.class);
|
||||||
|
|
||||||
// soft migration without changing DB version
|
// soft migration without changing DB version
|
||||||
createRowIfNotExists(getDaoBgReadings(), DatabaseHelper.DATABASE_BGREADINGS,
|
createColumnIfNotExists(getDaoBgReadings(), DatabaseHelper.DATABASE_BGREADINGS,
|
||||||
"isFiltered", "integer");
|
"isFiltered", "integer");
|
||||||
createRowIfNotExists(getDaoBgReadings(), DatabaseHelper.DATABASE_BGREADINGS,
|
createColumnIfNotExists(getDaoBgReadings(), DatabaseHelper.DATABASE_BGREADINGS,
|
||||||
"sourcePlugin", "text");
|
"sourcePlugin", "text");
|
||||||
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
@ -130,7 +129,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createRowIfNotExists(Dao dao, String table, String name, String type) {
|
private void createColumnIfNotExists(Dao dao, String table, String name, String type) {
|
||||||
try {
|
try {
|
||||||
final String statement = "ALTER TABLE `" + table + "` ADD COLUMN `" + name + "` " + type;
|
final String statement = "ALTER TABLE `" + table + "` ADD COLUMN `" + name + "` " + type;
|
||||||
dao.executeRaw(statement);
|
dao.executeRaw(statement);
|
||||||
|
|
Loading…
Reference in a new issue