diff --git a/app/src/main/kotlin/app/aaps/MainApp.kt b/app/src/main/kotlin/app/aaps/MainApp.kt index f2bae3284c..6534d0e2be 100644 --- a/app/src/main/kotlin/app/aaps/MainApp.kt +++ b/app/src/main/kotlin/app/aaps/MainApp.kt @@ -30,6 +30,9 @@ import app.aaps.core.interfaces.versionChecker.VersionCheckerUtils import app.aaps.core.ui.locale.LocaleHelper import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.UserEntry +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction +import app.aaps.database.impl.transactions.VersionChangeTransaction import app.aaps.di.DaggerAppComponent import app.aaps.implementation.db.CompatDBHelper import app.aaps.implementation.lifecycle.ProcessLifecycleListener @@ -46,9 +49,6 @@ import app.aaps.ui.activityMonitor.ActivityMonitor import app.aaps.ui.widget.Widget import dagger.android.AndroidInjector import dagger.android.DaggerApplication -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction -import info.nightscout.database.impl.transactions.VersionChangeTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.exceptions.UndeliverableException import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/kotlin/app/aaps/activities/HistoryBrowserData.kt b/app/src/main/kotlin/app/aaps/activities/HistoryBrowserData.kt index e93f9e29a6..a6cde726c5 100644 --- a/app/src/main/kotlin/app/aaps/activities/HistoryBrowserData.kt +++ b/app/src/main/kotlin/app/aaps/activities/HistoryBrowserData.kt @@ -13,10 +13,10 @@ import app.aaps.core.interfaces.utils.DecimalFormatter import app.aaps.core.main.graph.OverviewData import app.aaps.core.main.utils.fabric.FabricPrivacy import app.aaps.core.main.workflow.CalculationWorkflow +import app.aaps.database.impl.AppRepository import app.aaps.implementation.overview.OverviewDataImpl import app.aaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/kotlin/app/aaps/di/AppComponent.kt b/app/src/main/kotlin/app/aaps/di/AppComponent.kt index 703601777d..89158a92ab 100644 --- a/app/src/main/kotlin/app/aaps/di/AppComponent.kt +++ b/app/src/main/kotlin/app/aaps/di/AppComponent.kt @@ -3,6 +3,7 @@ package app.aaps.di import app.aaps.MainApp import app.aaps.core.main.di.CoreModule import app.aaps.core.validators.di.ValidatorsModule +import app.aaps.database.impl.DatabaseModule import app.aaps.implementation.di.ImplementationModule import app.aaps.plugins.aps.di.ApsModule import app.aaps.plugins.automation.di.AutomationModule @@ -14,6 +15,7 @@ import app.aaps.plugins.source.di.SourceModule import app.aaps.plugins.sync.di.OpenHumansModule import app.aaps.plugins.sync.di.SyncModule import app.aaps.shared.impl.di.SharedImplModule +import app.aaps.ui.di.UiModule import dagger.BindsInstance import dagger.Component import dagger.android.AndroidInjectionModule @@ -26,7 +28,6 @@ import info.nightscout.androidaps.plugins.pump.eopatch.dagger.EopatchModule import info.nightscout.androidaps.plugins.pump.medtronic.di.MedtronicModule import info.nightscout.androidaps.plugins.pump.omnipod.dash.di.OmnipodDashModule import info.nightscout.androidaps.plugins.pump.omnipod.eros.di.OmnipodErosModule -import info.nightscout.database.impl.DatabaseModule import info.nightscout.pump.combo.di.ComboModule import info.nightscout.pump.combov2.di.ComboV2Module import info.nightscout.pump.common.di.PumpCommonModule @@ -36,7 +37,6 @@ import info.nightscout.pump.danars.di.DanaRSModule import info.nightscout.pump.diaconn.di.DiaconnG8Module import info.nightscout.pump.medtrum.di.MedtrumModule import info.nightscout.pump.virtual.di.VirtualPumpModule -import app.aaps.ui.di.UiModule import info.nightscout.workflow.di.WorkflowModule import javax.inject.Singleton diff --git a/app/src/main/kotlin/app/aaps/receivers/KeepAliveWorker.kt b/app/src/main/kotlin/app/aaps/receivers/KeepAliveWorker.kt index fcefc76ec7..ce50f995ee 100644 --- a/app/src/main/kotlin/app/aaps/receivers/KeepAliveWorker.kt +++ b/app/src/main/kotlin/app/aaps/receivers/KeepAliveWorker.kt @@ -27,9 +27,9 @@ import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.T import app.aaps.core.main.profile.ProfileSealed import app.aaps.core.main.utils.worker.LoggingWorker +import app.aaps.database.impl.AppRepository import app.aaps.plugins.configuration.maintenance.MaintenancePlugin import com.google.common.util.concurrent.ListenableFuture -import info.nightscout.database.impl.AppRepository import kotlinx.coroutines.Dispatchers import java.util.concurrent.TimeUnit import javax.inject.Inject diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/pump/PumpSync.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/pump/PumpSync.kt index 7125ae74ce..5a887617e8 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/pump/PumpSync.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/pump/PumpSync.kt @@ -319,7 +319,7 @@ interface PumpSync { * if db record already has endPumpId assigned by [syncStopTemporaryBasalWithPumpId] other updates * are ignored * - * see [info.nightscout.database.impl.transactions.SyncPumpTemporaryBasalTransaction] + * see [app.aaps.database.impl.transactions.SyncPumpTemporaryBasalTransaction] * * @param timestamp timestamp of event from pump history * @param rate TBR rate in U/h or % (value of 100% is equal to no TBR) @@ -349,7 +349,7 @@ interface PumpSync { * endPumpId is stored to running record * If db record doesn't exist data is ignored and false returned * - * see [info.nightscout.database.impl.transactions.SyncPumpCancelTemporaryBasalIfAnyTransaction] + * see [app.aaps.database.impl.transactions.SyncPumpCancelTemporaryBasalIfAnyTransaction] * * @param timestamp timestamp of event from pump history * @param endPumpId pump id of ending event from history @@ -383,7 +383,7 @@ interface PumpSync { * @param pumpSerial pump serial number * @return true if new record is created * - * see [info.nightscout.database.impl.transactions.InsertTemporaryBasalWithTempIdTransaction] + * see [app.aaps.database.impl.transactions.InsertTemporaryBasalWithTempIdTransaction] **/ fun addTemporaryBasalWithTempId(timestamp: Long, rate: Double, duration: Long, isAbsolute: Boolean, tempId: Long, type: TemporaryBasalType, pumpType: PumpType, pumpSerial: String): Boolean @@ -475,7 +475,7 @@ interface PumpSync { * If db record doesn't exist, new record is created. * isValid field is preserved * - * see [info.nightscout.database.impl.transactions.SyncPumpExtendedBolusTransaction] + * see [app.aaps.database.impl.transactions.SyncPumpExtendedBolusTransaction] * * @param timestamp timestamp of event from pump history * @param amount EB total amount in U @@ -503,7 +503,7 @@ interface PumpSync { * endPumpId is stored to running record * If db record doesn't exist data is ignored and false returned * - * see [info.nightscout.database.impl.transactions.SyncPumpCancelExtendedBolusIfAnyTransaction] + * see [app.aaps.database.impl.transactions.SyncPumpCancelExtendedBolusIfAnyTransaction] * * @param timestamp timestamp of event from pump history * @param endPumpId pump id of ending event from history @@ -528,7 +528,7 @@ interface PumpSync { * isValid field is preserved * If db record doesn't exist, new record is created. * - * see [info.nightscout.database.impl.transactions.SyncPumpTotalDailyDoseTransaction] + * see [app.aaps.database.impl.transactions.SyncPumpTotalDailyDoseTransaction] * * @param timestamp timestamp of event from pump history * @param bolusAmount bolus part diff --git a/database/entities/build.gradle b/database/entities/build.gradle index b6e714c355..248d1db0c6 100644 --- a/database/entities/build.gradle +++ b/database/entities/build.gradle @@ -33,5 +33,5 @@ dependencies { allOpen { // allows mocking for classes w/o directly opening them for release builds - annotation 'info.nightscout.database.annotations.DbOpenForTesting' + annotation 'app.aaps.database.annotations.DbOpenForTesting' } diff --git a/database/impl/build.gradle b/database/impl/build.gradle index dbfddb9ba3..ae471b1193 100644 --- a/database/impl/build.gradle +++ b/database/impl/build.gradle @@ -11,8 +11,8 @@ apply from: "${project.rootDir}/core/main/test_dependencies.gradle" apply from: "${project.rootDir}/core/main/jacoco_global.gradle" android { + namespace 'app.aaps.database.impl' - namespace 'info.nightscout.database.impl' defaultConfig { kapt { arguments { diff --git a/database/impl/schemas/info.nightscout.database.impl.AppDatabase/24.json b/database/impl/schemas/app.aaps.database.impl.AppDatabase/24.json similarity index 100% rename from database/impl/schemas/info.nightscout.database.impl.AppDatabase/24.json rename to database/impl/schemas/app.aaps.database.impl.AppDatabase/24.json diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/1.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/1.json deleted file mode 100644 index 443eaa7bfe..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/1.json +++ /dev/null @@ -1,2689 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 1, - "identityHash": "0fd6104de57e4c29072de56b037a0e2c", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `amount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL, `bolusAmount` REAL, `totalAmount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "mealLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER, `carbsId` INTEGER, `bolusCalcResultId` INTEGER, `superbolusTempBasalId` INTEGER, `noteId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`carbsId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`bolusCalcResultId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`superbolusTempBasalId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`noteId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `mealLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "carbsId", - "columnName": "carbsId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusCalcResultId", - "columnName": "bolusCalcResultId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "superbolusTempBasalId", - "columnName": "superbolusTempBasalId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "noteId", - "columnName": "noteId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_mealLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_mealLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_mealLinks_carbsId", - "unique": false, - "columnNames": [ - "carbsId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_carbsId` ON `${TABLE_NAME}` (`carbsId`)" - }, - { - "name": "index_mealLinks_bolusCalcResultId", - "unique": false, - "columnNames": [ - "bolusCalcResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_bolusCalcResultId` ON `${TABLE_NAME}` (`bolusCalcResultId`)" - }, - { - "name": "index_mealLinks_superbolusTempBasalId", - "unique": false, - "columnNames": [ - "superbolusTempBasalId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_superbolusTempBasalId` ON `${TABLE_NAME}` (`superbolusTempBasalId`)" - }, - { - "name": "index_mealLinks_noteId", - "unique": false, - "columnNames": [ - "noteId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_noteId` ON `${TABLE_NAME}` (`noteId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "carbsId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusCalcResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "superbolusTempBasalId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "noteId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "mealLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '0fd6104de57e4c29072de56b037a0e2c')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/10.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/10.json deleted file mode 100644 index bf1c253a9c..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/10.json +++ /dev/null @@ -1,2931 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 10, - "identityHash": "e41836fe7fbd4aa439ec970af929ad7c", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL, `bolusAmount` REAL, `totalAmount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `s` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "s", - "columnName": "s", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "deviceStatus", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `device` TEXT, `pump` TEXT, `enacted` TEXT, `suggested` TEXT, `iob` TEXT, `uploaderBattery` INTEGER NOT NULL, `configuration` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pump", - "columnName": "pump", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enacted", - "columnName": "enacted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "suggested", - "columnName": "suggested", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "iob", - "columnName": "iob", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploaderBattery", - "columnName": "uploaderBattery", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "configuration", - "columnName": "configuration", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_deviceStatus_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e41836fe7fbd4aa439ec970af929ad7c')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/11.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/11.json deleted file mode 100644 index 15956090cc..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/11.json +++ /dev/null @@ -1,2943 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 11, - "identityHash": "5590bbcf7038e4422cf50dc16863b7c2", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `endPumpId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "endPumpId", - "columnName": "endPumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `endPumpId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "endPumpId", - "columnName": "endPumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL, `bolusAmount` REAL, `totalAmount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `s` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "s", - "columnName": "s", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "deviceStatus", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `device` TEXT, `pump` TEXT, `enacted` TEXT, `suggested` TEXT, `iob` TEXT, `uploaderBattery` INTEGER NOT NULL, `configuration` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pump", - "columnName": "pump", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enacted", - "columnName": "enacted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "suggested", - "columnName": "suggested", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "iob", - "columnName": "iob", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploaderBattery", - "columnName": "uploaderBattery", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "configuration", - "columnName": "configuration", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_deviceStatus_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '5590bbcf7038e4422cf50dc16863b7c2')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/12.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/12.json deleted file mode 100644 index f0d6ba022f..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/12.json +++ /dev/null @@ -1,2931 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 12, - "identityHash": "e41836fe7fbd4aa439ec970af929ad7c", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL, `bolusAmount` REAL, `totalAmount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `s` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "s", - "columnName": "s", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "deviceStatus", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `device` TEXT, `pump` TEXT, `enacted` TEXT, `suggested` TEXT, `iob` TEXT, `uploaderBattery` INTEGER NOT NULL, `configuration` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pump", - "columnName": "pump", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enacted", - "columnName": "enacted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "suggested", - "columnName": "suggested", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "iob", - "columnName": "iob", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploaderBattery", - "columnName": "uploaderBattery", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "configuration", - "columnName": "configuration", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_deviceStatus_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e41836fe7fbd4aa439ec970af929ad7c')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/14.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/14.json deleted file mode 100644 index aa6ee5a8d8..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/14.json +++ /dev/null @@ -1,2937 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 14, - "identityHash": "603fc16a317bf94aad5b6e9a2f0a96b7", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL, `bolusAmount` REAL, `totalAmount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `source` TEXT NOT NULL, `note` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "source", - "columnName": "source", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "deviceStatus", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `device` TEXT, `pump` TEXT, `enacted` TEXT, `suggested` TEXT, `iob` TEXT, `uploaderBattery` INTEGER NOT NULL, `configuration` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pump", - "columnName": "pump", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enacted", - "columnName": "enacted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "suggested", - "columnName": "suggested", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "iob", - "columnName": "iob", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploaderBattery", - "columnName": "uploaderBattery", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "configuration", - "columnName": "configuration", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_deviceStatus_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '603fc16a317bf94aad5b6e9a2f0a96b7')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/15.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/15.json deleted file mode 100644 index 6d50e3ec03..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/15.json +++ /dev/null @@ -1,2943 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 15, - "identityHash": "ee62c3d98dff077f4f5fc44147be7a4a", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL NOT NULL, `bolusAmount` REAL NOT NULL, `totalAmount` REAL NOT NULL, `carbs` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `source` TEXT NOT NULL, `note` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "source", - "columnName": "source", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "deviceStatus", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `device` TEXT, `pump` TEXT, `enacted` TEXT, `suggested` TEXT, `iob` TEXT, `uploaderBattery` INTEGER NOT NULL, `configuration` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pump", - "columnName": "pump", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enacted", - "columnName": "enacted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "suggested", - "columnName": "suggested", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "iob", - "columnName": "iob", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploaderBattery", - "columnName": "uploaderBattery", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "configuration", - "columnName": "configuration", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_deviceStatus_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'ee62c3d98dff077f4f5fc44147be7a4a')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/16.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/16.json deleted file mode 100644 index 4d04890dde..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/16.json +++ /dev/null @@ -1,2979 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 16, - "identityHash": "c3c67388df679b348d9bb08e11acb251", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL NOT NULL, `bolusAmount` REAL NOT NULL, `totalAmount` REAL NOT NULL, `carbs` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `source` TEXT NOT NULL, `note` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "source", - "columnName": "source", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "deviceStatus", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `device` TEXT, `pump` TEXT, `enacted` TEXT, `suggested` TEXT, `iob` TEXT, `uploaderBattery` INTEGER NOT NULL, `configuration` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pump", - "columnName": "pump", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enacted", - "columnName": "enacted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "suggested", - "columnName": "suggested", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "iob", - "columnName": "iob", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploaderBattery", - "columnName": "uploaderBattery", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "configuration", - "columnName": "configuration", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_deviceStatus_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'c3c67388df679b348d9bb08e11acb251')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/18.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/18.json deleted file mode 100644 index ffe675a735..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/18.json +++ /dev/null @@ -1,3015 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 18, - "identityHash": "51dcdf5478cdc06f9bfc22d8722771d7", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `originalProfileName` TEXT NOT NULL, `originalCustomizedName` TEXT NOT NULL, `originalTimeshift` INTEGER NOT NULL, `originalPercentage` INTEGER NOT NULL, `originalDuration` INTEGER NOT NULL, `originalEnd` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalProfileName", - "columnName": "originalProfileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalCustomizedName", - "columnName": "originalCustomizedName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalTimeshift", - "columnName": "originalTimeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalPercentage", - "columnName": "originalPercentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalDuration", - "columnName": "originalDuration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalEnd", - "columnName": "originalEnd", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `profileName` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL NOT NULL, `bolusAmount` REAL NOT NULL, `totalAmount` REAL NOT NULL, `carbs` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `source` TEXT NOT NULL, `note` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "source", - "columnName": "source", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "deviceStatus", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `device` TEXT, `pump` TEXT, `enacted` TEXT, `suggested` TEXT, `iob` TEXT, `uploaderBattery` INTEGER NOT NULL, `configuration` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pump", - "columnName": "pump", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enacted", - "columnName": "enacted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "suggested", - "columnName": "suggested", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "iob", - "columnName": "iob", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploaderBattery", - "columnName": "uploaderBattery", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "configuration", - "columnName": "configuration", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_deviceStatus_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '51dcdf5478cdc06f9bfc22d8722771d7')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/2.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/2.json deleted file mode 100644 index e3e7705d83..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/2.json +++ /dev/null @@ -1,2757 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 2, - "identityHash": "a1db89121451334b6eb389e8c702dd2c", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `amount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL, `bolusAmount` REAL, `totalAmount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "mealLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER, `carbsId` INTEGER, `bolusCalcResultId` INTEGER, `superbolusTempBasalId` INTEGER, `noteId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`carbsId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`bolusCalcResultId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`superbolusTempBasalId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`noteId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `mealLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "carbsId", - "columnName": "carbsId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusCalcResultId", - "columnName": "bolusCalcResultId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "superbolusTempBasalId", - "columnName": "superbolusTempBasalId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "noteId", - "columnName": "noteId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_mealLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_mealLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_mealLinks_carbsId", - "unique": false, - "columnNames": [ - "carbsId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_carbsId` ON `${TABLE_NAME}` (`carbsId`)" - }, - { - "name": "index_mealLinks_bolusCalcResultId", - "unique": false, - "columnNames": [ - "bolusCalcResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_bolusCalcResultId` ON `${TABLE_NAME}` (`bolusCalcResultId`)" - }, - { - "name": "index_mealLinks_superbolusTempBasalId", - "unique": false, - "columnNames": [ - "superbolusTempBasalId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_superbolusTempBasalId` ON `${TABLE_NAME}` (`superbolusTempBasalId`)" - }, - { - "name": "index_mealLinks_noteId", - "unique": false, - "columnNames": [ - "noteId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_noteId` ON `${TABLE_NAME}` (`noteId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "carbsId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusCalcResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "superbolusTempBasalId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "noteId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "mealLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `s` TEXT NOT NULL, `d1` REAL NOT NULL, `d2` REAL NOT NULL, `i1` INTEGER NOT NULL, `i2` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "s", - "columnName": "s", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "d1", - "columnName": "d1", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "d2", - "columnName": "d2", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "i1", - "columnName": "i1", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "i2", - "columnName": "i2", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a1db89121451334b6eb389e8c702dd2c')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/20.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/20.json deleted file mode 100644 index 9ee949cf15..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/20.json +++ /dev/null @@ -1,3424 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 20, - "identityHash": "9d3f2becffaecc2ee9508749be498ae4", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_boluses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_boluses_temporaryId", - "unique": false, - "columnNames": [ - "temporaryId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_temporaryId` ON `${TABLE_NAME}` (`temporaryId`)" - }, - { - "name": "index_boluses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_boluses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_boluses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_bolusCalculatorResults_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_bolusCalculatorResults_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_carbs_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_carbs_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `originalProfileName` TEXT NOT NULL, `originalCustomizedName` TEXT NOT NULL, `originalTimeshift` INTEGER NOT NULL, `originalPercentage` INTEGER NOT NULL, `originalDuration` INTEGER NOT NULL, `originalEnd` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalProfileName", - "columnName": "originalProfileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalCustomizedName", - "columnName": "originalCustomizedName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalTimeshift", - "columnName": "originalTimeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalPercentage", - "columnName": "originalPercentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalDuration", - "columnName": "originalDuration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalEnd", - "columnName": "originalEnd", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_effectiveProfileSwitches_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_extendedBoluses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_extendedBoluses_endId", - "unique": false, - "columnNames": [ - "endId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_endId` ON `${TABLE_NAME}` (`endId`)" - }, - { - "name": "index_extendedBoluses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_extendedBoluses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_extendedBoluses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_glucoseValues_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_glucoseValues_sourceSensor", - "unique": false, - "columnNames": [ - "sourceSensor" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_sourceSensor` ON `${TABLE_NAME}` (`sourceSensor`)" - }, - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `profileName` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_profileSwitches_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_profileSwitches_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_profileSwitches_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_temporaryBasals_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_temporaryBasals_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_temporaryBasals_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_temporaryBasals_endId", - "unique": false, - "columnNames": [ - "endId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_endId` ON `${TABLE_NAME}` (`endId`)" - }, - { - "name": "index_temporaryBasals_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_temporaryBasals_temporaryId", - "unique": false, - "columnNames": [ - "temporaryId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_temporaryId` ON `${TABLE_NAME}` (`temporaryId`)" - }, - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_temporaryTargets_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_temporaryTargets_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_therapyEvents_type", - "unique": false, - "columnNames": [ - "type" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_type` ON `${TABLE_NAME}` (`type`)" - }, - { - "name": "index_therapyEvents_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_therapyEvents_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL NOT NULL, `bolusAmount` REAL NOT NULL, `totalAmount` REAL NOT NULL, `carbs` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_totalDailyDoses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_totalDailyDoses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_totalDailyDoses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_totalDailyDoses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `source` TEXT NOT NULL, `note` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "source", - "columnName": "source", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_userEntry_source", - "unique": false, - "columnNames": [ - "source" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_userEntry_source` ON `${TABLE_NAME}` (`source`)" - }, - { - "name": "index_userEntry_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_userEntry_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_foods_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_foods_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "deviceStatus", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `device` TEXT, `pump` TEXT, `enacted` TEXT, `suggested` TEXT, `iob` TEXT, `uploaderBattery` INTEGER NOT NULL, `configuration` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pump", - "columnName": "pump", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enacted", - "columnName": "enacted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "suggested", - "columnName": "suggested", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "iob", - "columnName": "iob", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploaderBattery", - "columnName": "uploaderBattery", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "configuration", - "columnName": "configuration", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_deviceStatus_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_deviceStatus_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_deviceStatus_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '9d3f2becffaecc2ee9508749be498ae4')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/21.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/21.json deleted file mode 100644 index 383ec7b2ae..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/21.json +++ /dev/null @@ -1,3593 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 21, - "identityHash": "e3558dc3bb3136c37dba4f90c97e8bdd", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_boluses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_boluses_temporaryId", - "unique": false, - "columnNames": [ - "temporaryId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_temporaryId` ON `${TABLE_NAME}` (`temporaryId`)" - }, - { - "name": "index_boluses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_boluses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_boluses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_bolusCalculatorResults_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_bolusCalculatorResults_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_carbs_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_carbs_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `originalProfileName` TEXT NOT NULL, `originalCustomizedName` TEXT NOT NULL, `originalTimeshift` INTEGER NOT NULL, `originalPercentage` INTEGER NOT NULL, `originalDuration` INTEGER NOT NULL, `originalEnd` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalProfileName", - "columnName": "originalProfileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalCustomizedName", - "columnName": "originalCustomizedName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalTimeshift", - "columnName": "originalTimeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalPercentage", - "columnName": "originalPercentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalDuration", - "columnName": "originalDuration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalEnd", - "columnName": "originalEnd", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_effectiveProfileSwitches_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_extendedBoluses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_extendedBoluses_endId", - "unique": false, - "columnNames": [ - "endId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_endId` ON `${TABLE_NAME}` (`endId`)" - }, - { - "name": "index_extendedBoluses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_extendedBoluses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_extendedBoluses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_glucoseValues_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_glucoseValues_sourceSensor", - "unique": false, - "columnNames": [ - "sourceSensor" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_sourceSensor` ON `${TABLE_NAME}` (`sourceSensor`)" - }, - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `profileName` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_profileSwitches_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_profileSwitches_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_profileSwitches_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_temporaryBasals_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_temporaryBasals_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_temporaryBasals_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_temporaryBasals_endId", - "unique": false, - "columnNames": [ - "endId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_endId` ON `${TABLE_NAME}` (`endId`)" - }, - { - "name": "index_temporaryBasals_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_temporaryBasals_temporaryId", - "unique": false, - "columnNames": [ - "temporaryId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_temporaryId` ON `${TABLE_NAME}` (`temporaryId`)" - }, - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_temporaryTargets_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_temporaryTargets_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_therapyEvents_type", - "unique": false, - "columnNames": [ - "type" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_type` ON `${TABLE_NAME}` (`type`)" - }, - { - "name": "index_therapyEvents_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_therapyEvents_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL NOT NULL, `bolusAmount` REAL NOT NULL, `totalAmount` REAL NOT NULL, `carbs` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_totalDailyDoses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_totalDailyDoses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_totalDailyDoses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_totalDailyDoses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `source` TEXT NOT NULL, `note` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "source", - "columnName": "source", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_userEntry_source", - "unique": false, - "columnNames": [ - "source" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_userEntry_source` ON `${TABLE_NAME}` (`source`)" - }, - { - "name": "index_userEntry_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_userEntry_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_foods_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_foods_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "deviceStatus", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `device` TEXT, `pump` TEXT, `enacted` TEXT, `suggested` TEXT, `iob` TEXT, `uploaderBattery` INTEGER NOT NULL, `configuration` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pump", - "columnName": "pump", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enacted", - "columnName": "enacted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "suggested", - "columnName": "suggested", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "iob", - "columnName": "iob", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploaderBattery", - "columnName": "uploaderBattery", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "configuration", - "columnName": "configuration", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_deviceStatus_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_deviceStatus_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_deviceStatus_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - }, - { - "tableName": "offlineEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `offlineEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_offlineEvents_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_offlineEvents_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_offlineEvents_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_offlineEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_offlineEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "offlineEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e3558dc3bb3136c37dba4f90c97e8bdd')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/22.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/22.json deleted file mode 100644 index 93af25de94..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/22.json +++ /dev/null @@ -1,3605 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 22, - "identityHash": "09121464fb795b3c37bb1c2c2c3ea481", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `notes` TEXT, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "notes", - "columnName": "notes", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_boluses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_boluses_temporaryId", - "unique": false, - "columnNames": [ - "temporaryId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_temporaryId` ON `${TABLE_NAME}` (`temporaryId`)" - }, - { - "name": "index_boluses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_boluses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_boluses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_bolusCalculatorResults_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_bolusCalculatorResults_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `notes` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "notes", - "columnName": "notes", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_carbs_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_carbs_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `originalProfileName` TEXT NOT NULL, `originalCustomizedName` TEXT NOT NULL, `originalTimeshift` INTEGER NOT NULL, `originalPercentage` INTEGER NOT NULL, `originalDuration` INTEGER NOT NULL, `originalEnd` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalProfileName", - "columnName": "originalProfileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalCustomizedName", - "columnName": "originalCustomizedName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalTimeshift", - "columnName": "originalTimeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalPercentage", - "columnName": "originalPercentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalDuration", - "columnName": "originalDuration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalEnd", - "columnName": "originalEnd", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_effectiveProfileSwitches_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_extendedBoluses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_extendedBoluses_endId", - "unique": false, - "columnNames": [ - "endId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_endId` ON `${TABLE_NAME}` (`endId`)" - }, - { - "name": "index_extendedBoluses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_extendedBoluses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_extendedBoluses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_glucoseValues_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_glucoseValues_sourceSensor", - "unique": false, - "columnNames": [ - "sourceSensor" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_sourceSensor` ON `${TABLE_NAME}` (`sourceSensor`)" - }, - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `profileName` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_profileSwitches_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_profileSwitches_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_profileSwitches_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_temporaryBasals_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_temporaryBasals_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_temporaryBasals_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_temporaryBasals_endId", - "unique": false, - "columnNames": [ - "endId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_endId` ON `${TABLE_NAME}` (`endId`)" - }, - { - "name": "index_temporaryBasals_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_temporaryBasals_temporaryId", - "unique": false, - "columnNames": [ - "temporaryId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_temporaryId` ON `${TABLE_NAME}` (`temporaryId`)" - }, - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_temporaryTargets_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_temporaryTargets_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_therapyEvents_type", - "unique": false, - "columnNames": [ - "type" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_type` ON `${TABLE_NAME}` (`type`)" - }, - { - "name": "index_therapyEvents_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_therapyEvents_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL NOT NULL, `bolusAmount` REAL NOT NULL, `totalAmount` REAL NOT NULL, `carbs` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_totalDailyDoses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_totalDailyDoses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_totalDailyDoses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_totalDailyDoses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `source` TEXT NOT NULL, `note` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "source", - "columnName": "source", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_userEntry_source", - "unique": false, - "columnNames": [ - "source" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_userEntry_source` ON `${TABLE_NAME}` (`source`)" - }, - { - "name": "index_userEntry_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_userEntry_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_foods_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_foods_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "deviceStatus", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `device` TEXT, `pump` TEXT, `enacted` TEXT, `suggested` TEXT, `iob` TEXT, `uploaderBattery` INTEGER NOT NULL, `configuration` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pump", - "columnName": "pump", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enacted", - "columnName": "enacted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "suggested", - "columnName": "suggested", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "iob", - "columnName": "iob", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploaderBattery", - "columnName": "uploaderBattery", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "configuration", - "columnName": "configuration", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_deviceStatus_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_deviceStatus_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_deviceStatus_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - }, - { - "tableName": "offlineEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `offlineEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_offlineEvents_id", - "unique": false, - "columnNames": [ - "id" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_offlineEvents_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_offlineEvents_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_offlineEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_offlineEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "offlineEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '09121464fb795b3c37bb1c2c2c3ea481')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/4.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/4.json deleted file mode 100644 index 2271d3a4c9..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/4.json +++ /dev/null @@ -1,2757 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 4, - "identityHash": "c6cb19c6cfa6d0fb738b3f58818172ff", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `units` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "units", - "columnName": "units", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL, `bolusAmount` REAL, `totalAmount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "mealLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER, `carbsId` INTEGER, `bolusCalcResultId` INTEGER, `superbolusTempBasalId` INTEGER, `noteId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`carbsId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`bolusCalcResultId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`superbolusTempBasalId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`noteId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `mealLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "carbsId", - "columnName": "carbsId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusCalcResultId", - "columnName": "bolusCalcResultId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "superbolusTempBasalId", - "columnName": "superbolusTempBasalId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "noteId", - "columnName": "noteId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_mealLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_mealLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_mealLinks_carbsId", - "unique": false, - "columnNames": [ - "carbsId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_carbsId` ON `${TABLE_NAME}` (`carbsId`)" - }, - { - "name": "index_mealLinks_bolusCalcResultId", - "unique": false, - "columnNames": [ - "bolusCalcResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_bolusCalcResultId` ON `${TABLE_NAME}` (`bolusCalcResultId`)" - }, - { - "name": "index_mealLinks_superbolusTempBasalId", - "unique": false, - "columnNames": [ - "superbolusTempBasalId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_superbolusTempBasalId` ON `${TABLE_NAME}` (`superbolusTempBasalId`)" - }, - { - "name": "index_mealLinks_noteId", - "unique": false, - "columnNames": [ - "noteId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_noteId` ON `${TABLE_NAME}` (`noteId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "carbsId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusCalcResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "superbolusTempBasalId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "noteId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "mealLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `s` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "s", - "columnName": "s", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'c6cb19c6cfa6d0fb738b3f58818172ff')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/5.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/5.json deleted file mode 100644 index 8f6984283d..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/5.json +++ /dev/null @@ -1,2775 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 5, - "identityHash": "e6af0366f6f9cf18cce646762ad76c4e", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL, `bolusAmount` REAL, `totalAmount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "mealLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER, `carbsId` INTEGER, `bolusCalcResultId` INTEGER, `superbolusTempBasalId` INTEGER, `noteId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`carbsId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`bolusCalcResultId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`superbolusTempBasalId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`noteId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `mealLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "carbsId", - "columnName": "carbsId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusCalcResultId", - "columnName": "bolusCalcResultId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "superbolusTempBasalId", - "columnName": "superbolusTempBasalId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "noteId", - "columnName": "noteId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_mealLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_mealLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_mealLinks_carbsId", - "unique": false, - "columnNames": [ - "carbsId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_carbsId` ON `${TABLE_NAME}` (`carbsId`)" - }, - { - "name": "index_mealLinks_bolusCalcResultId", - "unique": false, - "columnNames": [ - "bolusCalcResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_bolusCalcResultId` ON `${TABLE_NAME}` (`bolusCalcResultId`)" - }, - { - "name": "index_mealLinks_superbolusTempBasalId", - "unique": false, - "columnNames": [ - "superbolusTempBasalId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_superbolusTempBasalId` ON `${TABLE_NAME}` (`superbolusTempBasalId`)" - }, - { - "name": "index_mealLinks_noteId", - "unique": false, - "columnNames": [ - "noteId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_noteId` ON `${TABLE_NAME}` (`noteId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "carbsId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusCalcResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "superbolusTempBasalId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "noteId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "mealLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `s` TEXT NOT NULL, `d1` REAL NOT NULL, `d2` REAL NOT NULL, `i1` INTEGER NOT NULL, `i2` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "s", - "columnName": "s", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "d1", - "columnName": "d1", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "d2", - "columnName": "d2", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "i1", - "columnName": "i1", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "i2", - "columnName": "i2", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e6af0366f6f9cf18cce646762ad76c4e')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/6.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/6.json deleted file mode 100644 index 65a449a04e..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/6.json +++ /dev/null @@ -1,2757 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 6, - "identityHash": "5cbfb4a2b7c92e48e0d05c9f459b529f", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL, `bolusAmount` REAL, `totalAmount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "mealLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER, `carbsId` INTEGER, `bolusCalcResultId` INTEGER, `superbolusTempBasalId` INTEGER, `noteId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`carbsId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`bolusCalcResultId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`superbolusTempBasalId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`noteId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `mealLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "carbsId", - "columnName": "carbsId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusCalcResultId", - "columnName": "bolusCalcResultId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "superbolusTempBasalId", - "columnName": "superbolusTempBasalId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "noteId", - "columnName": "noteId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_mealLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_mealLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_mealLinks_carbsId", - "unique": false, - "columnNames": [ - "carbsId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_carbsId` ON `${TABLE_NAME}` (`carbsId`)" - }, - { - "name": "index_mealLinks_bolusCalcResultId", - "unique": false, - "columnNames": [ - "bolusCalcResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_bolusCalcResultId` ON `${TABLE_NAME}` (`bolusCalcResultId`)" - }, - { - "name": "index_mealLinks_superbolusTempBasalId", - "unique": false, - "columnNames": [ - "superbolusTempBasalId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_superbolusTempBasalId` ON `${TABLE_NAME}` (`superbolusTempBasalId`)" - }, - { - "name": "index_mealLinks_noteId", - "unique": false, - "columnNames": [ - "noteId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_noteId` ON `${TABLE_NAME}` (`noteId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "carbsId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusCalcResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "superbolusTempBasalId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "noteId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "mealLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `s` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "s", - "columnName": "s", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '5cbfb4a2b7c92e48e0d05c9f459b529f')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/7.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/7.json deleted file mode 100644 index cb6fc6e0bb..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/7.json +++ /dev/null @@ -1,2924 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 7, - "identityHash": "7a8795e82743748b627944dc589e8626", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL, `bolusAmount` REAL, `totalAmount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "mealLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER, `carbsId` INTEGER, `bolusCalcResultId` INTEGER, `superbolusTempBasalId` INTEGER, `noteId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`carbsId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`bolusCalcResultId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`superbolusTempBasalId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`noteId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `mealLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "carbsId", - "columnName": "carbsId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusCalcResultId", - "columnName": "bolusCalcResultId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "superbolusTempBasalId", - "columnName": "superbolusTempBasalId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "noteId", - "columnName": "noteId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_mealLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_mealLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_mealLinks_carbsId", - "unique": false, - "columnNames": [ - "carbsId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_carbsId` ON `${TABLE_NAME}` (`carbsId`)" - }, - { - "name": "index_mealLinks_bolusCalcResultId", - "unique": false, - "columnNames": [ - "bolusCalcResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_bolusCalcResultId` ON `${TABLE_NAME}` (`bolusCalcResultId`)" - }, - { - "name": "index_mealLinks_superbolusTempBasalId", - "unique": false, - "columnNames": [ - "superbolusTempBasalId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_superbolusTempBasalId` ON `${TABLE_NAME}` (`superbolusTempBasalId`)" - }, - { - "name": "index_mealLinks_noteId", - "unique": false, - "columnNames": [ - "noteId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_mealLinks_noteId` ON `${TABLE_NAME}` (`noteId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "carbsId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusCalcResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "superbolusTempBasalId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "noteId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "mealLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `s` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "s", - "columnName": "s", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '7a8795e82743748b627944dc589e8626')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/8.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/8.json deleted file mode 100644 index b7cc18ae83..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/8.json +++ /dev/null @@ -1,2800 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 8, - "identityHash": "dab6024e846ee68708e8cfc047c39662", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL, `bolusAmount` REAL, `totalAmount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `s` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "s", - "columnName": "s", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'dab6024e846ee68708e8cfc047c39662')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/9.json b/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/9.json deleted file mode 100644 index ed66e112d9..0000000000 --- a/database/impl/schemas/info.nightscout.androidaps.database.AppDatabase/9.json +++ /dev/null @@ -1,2800 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 9, - "identityHash": "dab6024e846ee68708e8cfc047c39662", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL, `bolusAmount` REAL, `totalAmount` REAL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `s` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "s", - "columnName": "s", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'dab6024e846ee68708e8cfc047c39662')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.database.impl.AppDatabase/22.json b/database/impl/schemas/info.nightscout.database.impl.AppDatabase/22.json deleted file mode 100644 index b35d3cc1e8..0000000000 --- a/database/impl/schemas/info.nightscout.database.impl.AppDatabase/22.json +++ /dev/null @@ -1,3694 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 22, - "identityHash": "09121464fb795b3c37bb1c2c2c3ea481", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `notes` TEXT, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "notes", - "columnName": "notes", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_boluses_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_boluses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_boluses_temporaryId", - "unique": false, - "columnNames": [ - "temporaryId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_temporaryId` ON `${TABLE_NAME}` (`temporaryId`)" - }, - { - "name": "index_boluses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_boluses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_boluses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_bolusCalculatorResults_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_bolusCalculatorResults_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `notes` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "notes", - "columnName": "notes", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_carbs_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_carbs_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_carbs_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `originalProfileName` TEXT NOT NULL, `originalCustomizedName` TEXT NOT NULL, `originalTimeshift` INTEGER NOT NULL, `originalPercentage` INTEGER NOT NULL, `originalDuration` INTEGER NOT NULL, `originalEnd` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalProfileName", - "columnName": "originalProfileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalCustomizedName", - "columnName": "originalCustomizedName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalTimeshift", - "columnName": "originalTimeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalPercentage", - "columnName": "originalPercentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalDuration", - "columnName": "originalDuration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalEnd", - "columnName": "originalEnd", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_effectiveProfileSwitches_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_extendedBoluses_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_extendedBoluses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_extendedBoluses_endId", - "unique": false, - "columnNames": [ - "endId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_endId` ON `${TABLE_NAME}` (`endId`)" - }, - { - "name": "index_extendedBoluses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_extendedBoluses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_extendedBoluses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_glucoseValues_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_glucoseValues_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_glucoseValues_sourceSensor", - "unique": false, - "columnNames": [ - "sourceSensor" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_sourceSensor` ON `${TABLE_NAME}` (`sourceSensor`)" - }, - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `profileName` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_profileSwitches_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_profileSwitches_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_profileSwitches_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryBasals_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_temporaryBasals_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_temporaryBasals_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_temporaryBasals_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_temporaryBasals_endId", - "unique": false, - "columnNames": [ - "endId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_endId` ON `${TABLE_NAME}` (`endId`)" - }, - { - "name": "index_temporaryBasals_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_temporaryBasals_temporaryId", - "unique": false, - "columnNames": [ - "temporaryId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_temporaryId` ON `${TABLE_NAME}` (`temporaryId`)" - }, - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_temporaryTargets_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_temporaryTargets_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_temporaryTargets_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_therapyEvents_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_therapyEvents_type", - "unique": false, - "columnNames": [ - "type" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_type` ON `${TABLE_NAME}` (`type`)" - }, - { - "name": "index_therapyEvents_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_therapyEvents_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL NOT NULL, `bolusAmount` REAL NOT NULL, `totalAmount` REAL NOT NULL, `carbs` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_totalDailyDoses_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_totalDailyDoses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_totalDailyDoses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_totalDailyDoses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_totalDailyDoses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `source` TEXT NOT NULL, `note` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "source", - "columnName": "source", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_userEntry_source", - "unique": false, - "columnNames": [ - "source" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_userEntry_source` ON `${TABLE_NAME}` (`source`)" - }, - { - "name": "index_userEntry_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_userEntry_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_foods_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_foods_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_foods_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "deviceStatus", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `device` TEXT, `pump` TEXT, `enacted` TEXT, `suggested` TEXT, `iob` TEXT, `uploaderBattery` INTEGER NOT NULL, `configuration` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pump", - "columnName": "pump", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enacted", - "columnName": "enacted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "suggested", - "columnName": "suggested", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "iob", - "columnName": "iob", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploaderBattery", - "columnName": "uploaderBattery", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "configuration", - "columnName": "configuration", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_deviceStatus_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_deviceStatus_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_deviceStatus_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - }, - { - "tableName": "offlineEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `offlineEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_offlineEvents_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_offlineEvents_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_offlineEvents_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_offlineEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_offlineEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "offlineEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '09121464fb795b3c37bb1c2c2c3ea481')" - ] - } -} \ No newline at end of file diff --git a/database/impl/schemas/info.nightscout.database.impl.AppDatabase/23.json b/database/impl/schemas/info.nightscout.database.impl.AppDatabase/23.json deleted file mode 100644 index 343f364627..0000000000 --- a/database/impl/schemas/info.nightscout.database.impl.AppDatabase/23.json +++ /dev/null @@ -1,3841 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 23, - "identityHash": "a3ee37800b6cda170d0ea64799ed7876", - "entities": [ - { - "tableName": "apsResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `algorithm` TEXT NOT NULL, `glucoseStatusJson` TEXT NOT NULL, `currentTempJson` TEXT NOT NULL, `iobDataJson` TEXT NOT NULL, `profileJson` TEXT NOT NULL, `autosensDataJson` TEXT, `mealDataJson` TEXT NOT NULL, `isMicroBolusAllowed` INTEGER, `resultJson` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "algorithm", - "columnName": "algorithm", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseStatusJson", - "columnName": "glucoseStatusJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "currentTempJson", - "columnName": "currentTempJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "iobDataJson", - "columnName": "iobDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileJson", - "columnName": "profileJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "autosensDataJson", - "columnName": "autosensDataJson", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "mealDataJson", - "columnName": "mealDataJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isMicroBolusAllowed", - "columnName": "isMicroBolusAllowed", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "resultJson", - "columnName": "resultJson", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_apsResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "boluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `amount` REAL NOT NULL, `type` TEXT NOT NULL, `notes` TEXT, `isBasalInsulin` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT, `insulinEndTime` INTEGER, `peak` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "notes", - "columnName": "notes", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isBasalInsulin", - "columnName": "isBasalInsulin", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_boluses_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_boluses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_boluses_temporaryId", - "unique": false, - "columnNames": [ - "temporaryId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_temporaryId` ON `${TABLE_NAME}` (`temporaryId`)" - }, - { - "name": "index_boluses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_boluses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_boluses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_boluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_boluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_boluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "bolusCalculatorResults", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `targetBGLow` REAL NOT NULL, `targetBGHigh` REAL NOT NULL, `isf` REAL NOT NULL, `ic` REAL NOT NULL, `bolusIOB` REAL NOT NULL, `wasBolusIOBUsed` INTEGER NOT NULL, `basalIOB` REAL NOT NULL, `wasBasalIOBUsed` INTEGER NOT NULL, `glucoseValue` REAL NOT NULL, `wasGlucoseUsed` INTEGER NOT NULL, `glucoseDifference` REAL NOT NULL, `glucoseInsulin` REAL NOT NULL, `glucoseTrend` REAL NOT NULL, `wasTrendUsed` INTEGER NOT NULL, `trendInsulin` REAL NOT NULL, `cob` REAL NOT NULL, `wasCOBUsed` INTEGER NOT NULL, `cobInsulin` REAL NOT NULL, `carbs` REAL NOT NULL, `wereCarbsUsed` INTEGER NOT NULL, `carbsInsulin` REAL NOT NULL, `otherCorrection` REAL NOT NULL, `wasSuperbolusUsed` INTEGER NOT NULL, `superbolusInsulin` REAL NOT NULL, `wasTempTargetUsed` INTEGER NOT NULL, `totalInsulin` REAL NOT NULL, `percentageCorrection` INTEGER NOT NULL, `profileName` TEXT NOT NULL, `note` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `bolusCalculatorResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "targetBGLow", - "columnName": "targetBGLow", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "targetBGHigh", - "columnName": "targetBGHigh", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isf", - "columnName": "isf", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "ic", - "columnName": "ic", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusIOB", - "columnName": "bolusIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBolusIOBUsed", - "columnName": "wasBolusIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalIOB", - "columnName": "basalIOB", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasBasalIOBUsed", - "columnName": "wasBasalIOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseValue", - "columnName": "glucoseValue", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasGlucoseUsed", - "columnName": "wasGlucoseUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "glucoseDifference", - "columnName": "glucoseDifference", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseInsulin", - "columnName": "glucoseInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "glucoseTrend", - "columnName": "glucoseTrend", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTrendUsed", - "columnName": "wasTrendUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "trendInsulin", - "columnName": "trendInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "cob", - "columnName": "cob", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasCOBUsed", - "columnName": "wasCOBUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "cobInsulin", - "columnName": "cobInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wereCarbsUsed", - "columnName": "wereCarbsUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "carbsInsulin", - "columnName": "carbsInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "otherCorrection", - "columnName": "otherCorrection", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasSuperbolusUsed", - "columnName": "wasSuperbolusUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "superbolusInsulin", - "columnName": "superbolusInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "wasTempTargetUsed", - "columnName": "wasTempTargetUsed", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "totalInsulin", - "columnName": "totalInsulin", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "percentageCorrection", - "columnName": "percentageCorrection", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_bolusCalculatorResults_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_bolusCalculatorResults_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_bolusCalculatorResults_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_bolusCalculatorResults_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_bolusCalculatorResults_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "bolusCalculatorResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "carbs", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `notes` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `carbs`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "notes", - "columnName": "notes", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_carbs_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_carbs_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_carbs_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_carbs_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_carbs_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_carbs_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "carbs", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "effectiveProfileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `originalProfileName` TEXT NOT NULL, `originalCustomizedName` TEXT NOT NULL, `originalTimeshift` INTEGER NOT NULL, `originalPercentage` INTEGER NOT NULL, `originalDuration` INTEGER NOT NULL, `originalEnd` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `effectiveProfileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalProfileName", - "columnName": "originalProfileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalCustomizedName", - "columnName": "originalCustomizedName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "originalTimeshift", - "columnName": "originalTimeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalPercentage", - "columnName": "originalPercentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalDuration", - "columnName": "originalDuration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "originalEnd", - "columnName": "originalEnd", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_effectiveProfileSwitches_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_effectiveProfileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_effectiveProfileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_effectiveProfileSwitches_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_effectiveProfileSwitches_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "effectiveProfileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "extendedBoluses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `amount` REAL NOT NULL, `isEmulatingTempBasal` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "amount", - "columnName": "amount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "isEmulatingTempBasal", - "columnName": "isEmulatingTempBasal", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_extendedBoluses_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_extendedBoluses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_extendedBoluses_endId", - "unique": false, - "columnNames": [ - "endId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_endId` ON `${TABLE_NAME}` (`endId`)" - }, - { - "name": "index_extendedBoluses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_extendedBoluses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_extendedBoluses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_extendedBoluses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_extendedBoluses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_extendedBoluses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "glucoseValues", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `raw` REAL, `value` REAL NOT NULL, `trendArrow` TEXT NOT NULL, `noise` REAL, `sourceSensor` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `glucoseValues`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "raw", - "columnName": "raw", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "trendArrow", - "columnName": "trendArrow", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "noise", - "columnName": "noise", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "sourceSensor", - "columnName": "sourceSensor", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_glucoseValues_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_glucoseValues_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_glucoseValues_sourceSensor", - "unique": false, - "columnNames": [ - "sourceSensor" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_sourceSensor` ON `${TABLE_NAME}` (`sourceSensor`)" - }, - { - "name": "index_glucoseValues_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_glucoseValues_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_glucoseValues_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "glucoseValues", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "profileSwitches", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalBlocks` TEXT NOT NULL, `isfBlocks` TEXT NOT NULL, `icBlocks` TEXT NOT NULL, `targetBlocks` TEXT NOT NULL, `glucoseUnit` TEXT NOT NULL, `profileName` TEXT NOT NULL, `timeshift` INTEGER NOT NULL, `percentage` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, `insulinLabel` TEXT NOT NULL, `insulinEndTime` INTEGER NOT NULL, `peak` INTEGER NOT NULL, FOREIGN KEY(`referenceId`) REFERENCES `profileSwitches`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalBlocks", - "columnName": "basalBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isfBlocks", - "columnName": "isfBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "icBlocks", - "columnName": "icBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "targetBlocks", - "columnName": "targetBlocks", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "profileName", - "columnName": "profileName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "timeshift", - "columnName": "timeshift", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "percentage", - "columnName": "percentage", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "insulinConfiguration.insulinLabel", - "columnName": "insulinLabel", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.insulinEndTime", - "columnName": "insulinEndTime", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insulinConfiguration.peak", - "columnName": "peak", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_profileSwitches_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_profileSwitches_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - }, - { - "name": "index_profileSwitches_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_profileSwitches_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_profileSwitches_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_profileSwitches_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - } - ], - "foreignKeys": [ - { - "table": "profileSwitches", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryBasals", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `type` TEXT NOT NULL, `isAbsolute` INTEGER NOT NULL, `rate` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isAbsolute", - "columnName": "isAbsolute", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "rate", - "columnName": "rate", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_temporaryBasals_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_temporaryBasals_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_temporaryBasals_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_temporaryBasals_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_temporaryBasals_endId", - "unique": false, - "columnNames": [ - "endId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_endId` ON `${TABLE_NAME}` (`endId`)" - }, - { - "name": "index_temporaryBasals_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_temporaryBasals_temporaryId", - "unique": false, - "columnNames": [ - "temporaryId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_temporaryId` ON `${TABLE_NAME}` (`temporaryId`)" - }, - { - "name": "index_temporaryBasals_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryBasals_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryBasals_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "temporaryTargets", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `highTarget` REAL NOT NULL, `lowTarget` REAL NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `temporaryTargets`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "highTarget", - "columnName": "highTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "lowTarget", - "columnName": "lowTarget", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_temporaryTargets_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_temporaryTargets_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_temporaryTargets_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_temporaryTargets_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_temporaryTargets_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_temporaryTargets_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "temporaryTargets", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "therapyEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `type` TEXT NOT NULL, `note` TEXT, `enteredBy` TEXT, `glucose` REAL, `glucoseType` TEXT, `glucoseUnit` TEXT NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `therapyEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enteredBy", - "columnName": "enteredBy", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucose", - "columnName": "glucose", - "affinity": "REAL", - "notNull": false - }, - { - "fieldPath": "glucoseType", - "columnName": "glucoseType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "glucoseUnit", - "columnName": "glucoseUnit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_therapyEvents_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_therapyEvents_type", - "unique": false, - "columnNames": [ - "type" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_type` ON `${TABLE_NAME}` (`type`)" - }, - { - "name": "index_therapyEvents_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_therapyEvents_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_therapyEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_therapyEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_therapyEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "therapyEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "totalDailyDoses", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `basalAmount` REAL NOT NULL, `bolusAmount` REAL NOT NULL, `totalAmount` REAL NOT NULL, `carbs` REAL NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `totalDailyDoses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "basalAmount", - "columnName": "basalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "bolusAmount", - "columnName": "bolusAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "totalAmount", - "columnName": "totalAmount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_totalDailyDoses_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_totalDailyDoses_pumpId", - "unique": false, - "columnNames": [ - "pumpId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpId` ON `${TABLE_NAME}` (`pumpId`)" - }, - { - "name": "index_totalDailyDoses_pumpType", - "unique": false, - "columnNames": [ - "pumpType" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpType` ON `${TABLE_NAME}` (`pumpType`)" - }, - { - "name": "index_totalDailyDoses_pumpSerial", - "unique": false, - "columnNames": [ - "pumpSerial" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_pumpSerial` ON `${TABLE_NAME}` (`pumpSerial`)" - }, - { - "name": "index_totalDailyDoses_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_totalDailyDoses_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_totalDailyDoses_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_totalDailyDoses_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "totalDailyDoses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "apsResultLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `apsResultId` INTEGER NOT NULL, `smbId` INTEGER, `tbrId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`apsResultId`) REFERENCES `apsResults`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`smbId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`tbrId`) REFERENCES `temporaryBasals`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `apsResultLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "apsResultId", - "columnName": "apsResultId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "smbId", - "columnName": "smbId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "tbrId", - "columnName": "tbrId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_apsResultLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_apsResultLinks_apsResultId", - "unique": false, - "columnNames": [ - "apsResultId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_apsResultId` ON `${TABLE_NAME}` (`apsResultId`)" - }, - { - "name": "index_apsResultLinks_smbId", - "unique": false, - "columnNames": [ - "smbId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_smbId` ON `${TABLE_NAME}` (`smbId`)" - }, - { - "name": "index_apsResultLinks_tbrId", - "unique": false, - "columnNames": [ - "tbrId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_apsResultLinks_tbrId` ON `${TABLE_NAME}` (`tbrId`)" - } - ], - "foreignKeys": [ - { - "table": "apsResults", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "apsResultId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "smbId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "temporaryBasals", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "tbrId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "apsResultLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "multiwaveBolusLinks", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `bolusId` INTEGER NOT NULL, `extendedBolusId` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`bolusId`) REFERENCES `boluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`extendedBolusId`) REFERENCES `extendedBoluses`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`referenceId`) REFERENCES `multiwaveBolusLinks`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "bolusId", - "columnName": "bolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "extendedBolusId", - "columnName": "extendedBolusId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_multiwaveBolusLinks_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_multiwaveBolusLinks_bolusId", - "unique": false, - "columnNames": [ - "bolusId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_bolusId` ON `${TABLE_NAME}` (`bolusId`)" - }, - { - "name": "index_multiwaveBolusLinks_extendedBolusId", - "unique": false, - "columnNames": [ - "extendedBolusId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_multiwaveBolusLinks_extendedBolusId` ON `${TABLE_NAME}` (`extendedBolusId`)" - } - ], - "foreignKeys": [ - { - "table": "boluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "bolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "extendedBoluses", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "extendedBolusId" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "multiwaveBolusLinks", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "preferenceChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `key` TEXT NOT NULL, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "versionChanges", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `versionCode` INTEGER NOT NULL, `versionName` TEXT NOT NULL, `gitRemote` TEXT, `commitHash` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionCode", - "columnName": "versionCode", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "versionName", - "columnName": "versionName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gitRemote", - "columnName": "gitRemote", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "commitHash", - "columnName": "commitHash", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "userEntry", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `source` TEXT NOT NULL, `note` TEXT NOT NULL, `values` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "action", - "columnName": "action", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "source", - "columnName": "source", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "values", - "columnName": "values", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_userEntry_source", - "unique": false, - "columnNames": [ - "source" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_userEntry_source` ON `${TABLE_NAME}` (`source`)" - }, - { - "name": "index_userEntry_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_userEntry_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - }, - { - "tableName": "foods", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `name` TEXT NOT NULL, `category` TEXT, `subCategory` TEXT, `portion` REAL NOT NULL, `carbs` INTEGER NOT NULL, `fat` INTEGER, `protein` INTEGER, `energy` INTEGER, `unit` TEXT NOT NULL, `gi` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `foods`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subCategory", - "columnName": "subCategory", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "portion", - "columnName": "portion", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "carbs", - "columnName": "carbs", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "fat", - "columnName": "fat", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "protein", - "columnName": "protein", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "energy", - "columnName": "energy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unit", - "columnName": "unit", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "gi", - "columnName": "gi", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_foods_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_foods_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_foods_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_foods_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_foods_isValid` ON `${TABLE_NAME}` (`isValid`)" - } - ], - "foreignKeys": [ - { - "table": "foods", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "deviceStatus", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `device` TEXT, `pump` TEXT, `enacted` TEXT, `suggested` TEXT, `iob` TEXT, `uploaderBattery` INTEGER NOT NULL, `isCharging` INTEGER, `configuration` TEXT, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pump", - "columnName": "pump", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "enacted", - "columnName": "enacted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "suggested", - "columnName": "suggested", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "iob", - "columnName": "iob", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploaderBattery", - "columnName": "uploaderBattery", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isCharging", - "columnName": "isCharging", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "configuration", - "columnName": "configuration", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_deviceStatus_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_deviceStatus_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_deviceStatus_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_deviceStatus_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - }, - { - "tableName": "offlineEvents", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `reason` TEXT NOT NULL, `duration` INTEGER NOT NULL, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER, FOREIGN KEY(`referenceId`) REFERENCES `offlineEvents`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "reason", - "columnName": "reason", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_offlineEvents_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_offlineEvents_isValid", - "unique": false, - "columnNames": [ - "isValid" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_isValid` ON `${TABLE_NAME}` (`isValid`)" - }, - { - "name": "index_offlineEvents_nightscoutId", - "unique": false, - "columnNames": [ - "nightscoutId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_nightscoutId` ON `${TABLE_NAME}` (`nightscoutId`)" - }, - { - "name": "index_offlineEvents_referenceId", - "unique": false, - "columnNames": [ - "referenceId" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_referenceId` ON `${TABLE_NAME}` (`referenceId`)" - }, - { - "name": "index_offlineEvents_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_offlineEvents_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [ - { - "table": "offlineEvents", - "onDelete": "NO ACTION", - "onUpdate": "NO ACTION", - "columns": [ - "referenceId" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "heartRate", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `duration` INTEGER NOT NULL, `timestamp` INTEGER NOT NULL, `beatsPerMinute` REAL NOT NULL, `device` TEXT NOT NULL, `utcOffset` INTEGER NOT NULL, `version` INTEGER NOT NULL, `dateCreated` INTEGER NOT NULL, `isValid` INTEGER NOT NULL, `referenceId` INTEGER, `nightscoutSystemId` TEXT, `nightscoutId` TEXT, `pumpType` TEXT, `pumpSerial` TEXT, `temporaryId` INTEGER, `pumpId` INTEGER, `startId` INTEGER, `endId` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "duration", - "columnName": "duration", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "timestamp", - "columnName": "timestamp", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "beatsPerMinute", - "columnName": "beatsPerMinute", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "device", - "columnName": "device", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "utcOffset", - "columnName": "utcOffset", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "dateCreated", - "columnName": "dateCreated", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isValid", - "columnName": "isValid", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "referenceId", - "columnName": "referenceId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutSystemId", - "columnName": "nightscoutSystemId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.nightscoutId", - "columnName": "nightscoutId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpType", - "columnName": "pumpType", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpSerial", - "columnName": "pumpSerial", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.temporaryId", - "columnName": "temporaryId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.pumpId", - "columnName": "pumpId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.startId", - "columnName": "startId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "interfaceIDs_backing.endId", - "columnName": "endId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_heartRate_id", - "unique": false, - "columnNames": [ - "id" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_heartRate_id` ON `${TABLE_NAME}` (`id`)" - }, - { - "name": "index_heartRate_timestamp", - "unique": false, - "columnNames": [ - "timestamp" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_heartRate_timestamp` ON `${TABLE_NAME}` (`timestamp`)" - } - ], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a3ee37800b6cda170d0ea64799ed7876')" - ] - } -} \ No newline at end of file diff --git a/database/impl/src/androidTest/java/info/nightscout/database/impl/HeartRateDaoTest.kt b/database/impl/src/androidTest/kotlin/app/aaps/database/impl/HeartRateDaoTest.kt similarity index 99% rename from database/impl/src/androidTest/java/info/nightscout/database/impl/HeartRateDaoTest.kt rename to database/impl/src/androidTest/kotlin/app/aaps/database/impl/HeartRateDaoTest.kt index 29aa8a5e9a..669a5dbe7f 100644 --- a/database/impl/src/androidTest/java/info/nightscout/database/impl/HeartRateDaoTest.kt +++ b/database/impl/src/androidTest/kotlin/app/aaps/database/impl/HeartRateDaoTest.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl +package app.aaps.database.impl import android.content.Context import androidx.room.Room diff --git a/database/impl/src/androidTest/java/info/nightscout/database/impl/transactions/InsertOrUpdateHeartRateTransactionTest.kt b/database/impl/src/androidTest/kotlin/app/aaps/database/impl/transactions/InsertOrUpdateHeartRateTransactionTest.kt similarity index 89% rename from database/impl/src/androidTest/java/info/nightscout/database/impl/transactions/InsertOrUpdateHeartRateTransactionTest.kt rename to database/impl/src/androidTest/kotlin/app/aaps/database/impl/transactions/InsertOrUpdateHeartRateTransactionTest.kt index 7f00f1757d..a801fab59f 100644 --- a/database/impl/src/androidTest/java/info/nightscout/database/impl/transactions/InsertOrUpdateHeartRateTransactionTest.kt +++ b/database/impl/src/androidTest/kotlin/app/aaps/database/impl/transactions/InsertOrUpdateHeartRateTransactionTest.kt @@ -1,12 +1,12 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import android.content.Context import androidx.room.Room import androidx.test.core.app.ApplicationProvider import androidx.test.ext.junit.runners.AndroidJUnit4 -import info.nightscout.database.impl.AppDatabase -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.HeartRateDaoTest +import app.aaps.database.impl.AppDatabase +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.HeartRateDaoTest import org.junit.After import org.junit.Assert.assertEquals import org.junit.Assert.assertNotEquals diff --git a/database/impl/src/debug/java/info/nightscout/database/annotations/DbOpenForTesting.kt b/database/impl/src/debug/kotlin/app/aaps/database/annotations/DbOpenForTesting.kt similarity index 90% rename from database/impl/src/debug/java/info/nightscout/database/annotations/DbOpenForTesting.kt rename to database/impl/src/debug/kotlin/app/aaps/database/annotations/DbOpenForTesting.kt index 2295dce4c1..4d71733d52 100644 --- a/database/impl/src/debug/java/info/nightscout/database/annotations/DbOpenForTesting.kt +++ b/database/impl/src/debug/kotlin/app/aaps/database/annotations/DbOpenForTesting.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.annotations +package app.aaps.database.annotations /** * This is the actual annotation that makes the class open. Don't use it directly, only through [DbOpenForTesting] diff --git a/database/impl/src/main/java/info/nightscout/database/impl/AppDatabase.kt b/database/impl/src/main/java/app/aaps/database/impl/AppDatabase.kt similarity index 69% rename from database/impl/src/main/java/info/nightscout/database/impl/AppDatabase.kt rename to database/impl/src/main/java/app/aaps/database/impl/AppDatabase.kt index ecfdfd8fa5..f12bf1126f 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/AppDatabase.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/AppDatabase.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl +package app.aaps.database.impl import androidx.room.Database import androidx.room.RoomDatabase @@ -22,27 +22,27 @@ import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.TotalDailyDose import app.aaps.database.entities.UserEntry import app.aaps.database.entities.VersionChange -import info.nightscout.database.impl.daos.APSResultDao -import info.nightscout.database.impl.daos.APSResultLinkDao -import info.nightscout.database.impl.daos.BolusCalculatorResultDao -import info.nightscout.database.impl.daos.BolusDao -import info.nightscout.database.impl.daos.CarbsDao -import info.nightscout.database.impl.daos.DeviceStatusDao -import info.nightscout.database.impl.daos.EffectiveProfileSwitchDao -import info.nightscout.database.impl.daos.ExtendedBolusDao -import info.nightscout.database.impl.daos.FoodDao -import info.nightscout.database.impl.daos.GlucoseValueDao -import info.nightscout.database.impl.daos.HeartRateDao -import info.nightscout.database.impl.daos.MultiwaveBolusLinkDao -import info.nightscout.database.impl.daos.OfflineEventDao -import info.nightscout.database.impl.daos.PreferenceChangeDao -import info.nightscout.database.impl.daos.ProfileSwitchDao -import info.nightscout.database.impl.daos.TemporaryBasalDao -import info.nightscout.database.impl.daos.TemporaryTargetDao -import info.nightscout.database.impl.daos.TherapyEventDao -import info.nightscout.database.impl.daos.TotalDailyDoseDao -import info.nightscout.database.impl.daos.UserEntryDao -import info.nightscout.database.impl.daos.VersionChangeDao +import app.aaps.database.impl.daos.APSResultDao +import app.aaps.database.impl.daos.APSResultLinkDao +import app.aaps.database.impl.daos.BolusCalculatorResultDao +import app.aaps.database.impl.daos.BolusDao +import app.aaps.database.impl.daos.CarbsDao +import app.aaps.database.impl.daos.DeviceStatusDao +import app.aaps.database.impl.daos.EffectiveProfileSwitchDao +import app.aaps.database.impl.daos.ExtendedBolusDao +import app.aaps.database.impl.daos.FoodDao +import app.aaps.database.impl.daos.GlucoseValueDao +import app.aaps.database.impl.daos.HeartRateDao +import app.aaps.database.impl.daos.MultiwaveBolusLinkDao +import app.aaps.database.impl.daos.OfflineEventDao +import app.aaps.database.impl.daos.PreferenceChangeDao +import app.aaps.database.impl.daos.ProfileSwitchDao +import app.aaps.database.impl.daos.TemporaryBasalDao +import app.aaps.database.impl.daos.TemporaryTargetDao +import app.aaps.database.impl.daos.TherapyEventDao +import app.aaps.database.impl.daos.TotalDailyDoseDao +import app.aaps.database.impl.daos.UserEntryDao +import app.aaps.database.impl.daos.VersionChangeDao import java.io.Closeable const val DATABASE_VERSION = 24 diff --git a/database/impl/src/main/java/info/nightscout/database/impl/AppRepository.kt b/database/impl/src/main/java/app/aaps/database/impl/AppRepository.kt similarity index 99% rename from database/impl/src/main/java/info/nightscout/database/impl/AppRepository.kt rename to database/impl/src/main/java/app/aaps/database/impl/AppRepository.kt index 11141cec85..0e82476a24 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/AppRepository.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/AppRepository.kt @@ -1,6 +1,7 @@ -package info.nightscout.database.impl +package app.aaps.database.impl import app.aaps.database.ValueWrapper +import app.aaps.database.annotations.DbOpenForTesting import app.aaps.database.entities.Bolus import app.aaps.database.entities.BolusCalculatorResult import app.aaps.database.entities.Carbs @@ -20,8 +21,7 @@ import app.aaps.database.entities.UserEntry import app.aaps.database.entities.data.NewEntries import app.aaps.database.entities.embedments.InterfaceIDs import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.annotations.DbOpenForTesting -import info.nightscout.database.impl.transactions.Transaction +import app.aaps.database.impl.transactions.Transaction import io.reactivex.rxjava3.core.Completable import io.reactivex.rxjava3.core.Maybe import io.reactivex.rxjava3.core.Observable diff --git a/database/impl/src/main/java/info/nightscout/database/impl/Converters.kt b/database/impl/src/main/java/app/aaps/database/impl/Converters.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/Converters.kt rename to database/impl/src/main/java/app/aaps/database/impl/Converters.kt index 3aeb438cc2..c62cf09c8d 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/Converters.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/Converters.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl +package app.aaps.database.impl import androidx.room.TypeConverter import app.aaps.database.entities.APSResult @@ -16,8 +16,8 @@ import app.aaps.database.entities.ValueWithUnit import app.aaps.database.entities.data.Block import app.aaps.database.entities.data.TargetBlock import app.aaps.database.entities.embedments.InterfaceIDs -import info.nightscout.database.impl.serialisation.SealedClassHelper -import info.nightscout.database.impl.serialisation.fromJson +import app.aaps.database.impl.serialisation.SealedClassHelper +import app.aaps.database.impl.serialisation.fromJson import org.json.JSONArray import org.json.JSONObject diff --git a/database/impl/src/main/java/info/nightscout/database/impl/DatabaseModule.kt b/database/impl/src/main/java/app/aaps/database/impl/DatabaseModule.kt similarity index 99% rename from database/impl/src/main/java/info/nightscout/database/impl/DatabaseModule.kt rename to database/impl/src/main/java/app/aaps/database/impl/DatabaseModule.kt index 807716b9f9..0d3aa8c124 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/DatabaseModule.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/DatabaseModule.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl +package app.aaps.database.impl import android.content.Context import androidx.annotation.VisibleForTesting diff --git a/database/impl/src/main/java/app/aaps/database/impl/DelegatedAppDatabase.kt b/database/impl/src/main/java/app/aaps/database/impl/DelegatedAppDatabase.kt new file mode 100644 index 0000000000..82f26d2387 --- /dev/null +++ b/database/impl/src/main/java/app/aaps/database/impl/DelegatedAppDatabase.kt @@ -0,0 +1,71 @@ +package app.aaps.database.impl + +import app.aaps.database.entities.interfaces.DBEntry +import app.aaps.database.impl.daos.APSResultDao +import app.aaps.database.impl.daos.APSResultLinkDao +import app.aaps.database.impl.daos.BolusCalculatorResultDao +import app.aaps.database.impl.daos.BolusDao +import app.aaps.database.impl.daos.CarbsDao +import app.aaps.database.impl.daos.DeviceStatusDao +import app.aaps.database.impl.daos.EffectiveProfileSwitchDao +import app.aaps.database.impl.daos.ExtendedBolusDao +import app.aaps.database.impl.daos.FoodDao +import app.aaps.database.impl.daos.GlucoseValueDao +import app.aaps.database.impl.daos.HeartRateDao +import app.aaps.database.impl.daos.MultiwaveBolusLinkDao +import app.aaps.database.impl.daos.OfflineEventDao +import app.aaps.database.impl.daos.PreferenceChangeDao +import app.aaps.database.impl.daos.ProfileSwitchDao +import app.aaps.database.impl.daos.TemporaryBasalDao +import app.aaps.database.impl.daos.TemporaryTargetDao +import app.aaps.database.impl.daos.TherapyEventDao +import app.aaps.database.impl.daos.TotalDailyDoseDao +import app.aaps.database.impl.daos.UserEntryDao +import app.aaps.database.impl.daos.VersionChangeDao +import app.aaps.database.impl.daos.delegated.DelegatedAPSResultDao +import app.aaps.database.impl.daos.delegated.DelegatedAPSResultLinkDao +import app.aaps.database.impl.daos.delegated.DelegatedBolusCalculatorResultDao +import app.aaps.database.impl.daos.delegated.DelegatedBolusDao +import app.aaps.database.impl.daos.delegated.DelegatedCarbsDao +import app.aaps.database.impl.daos.delegated.DelegatedDeviceStatusDao +import app.aaps.database.impl.daos.delegated.DelegatedEffectiveProfileSwitchDao +import app.aaps.database.impl.daos.delegated.DelegatedExtendedBolusDao +import app.aaps.database.impl.daos.delegated.DelegatedFoodDao +import app.aaps.database.impl.daos.delegated.DelegatedGlucoseValueDao +import app.aaps.database.impl.daos.delegated.DelegatedHeartRateDao +import app.aaps.database.impl.daos.delegated.DelegatedMultiwaveBolusLinkDao +import app.aaps.database.impl.daos.delegated.DelegatedOfflineEventDao +import app.aaps.database.impl.daos.delegated.DelegatedPreferenceChangeDao +import app.aaps.database.impl.daos.delegated.DelegatedProfileSwitchDao +import app.aaps.database.impl.daos.delegated.DelegatedTemporaryBasalDao +import app.aaps.database.impl.daos.delegated.DelegatedTemporaryTargetDao +import app.aaps.database.impl.daos.delegated.DelegatedTherapyEventDao +import app.aaps.database.impl.daos.delegated.DelegatedTotalDailyDoseDao +import app.aaps.database.impl.daos.delegated.DelegatedUserEntryDao +import app.aaps.database.impl.daos.delegated.DelegatedVersionChangeDao + +internal class DelegatedAppDatabase(val changes: MutableList, val database: AppDatabase) { + + val glucoseValueDao: GlucoseValueDao = DelegatedGlucoseValueDao(changes, database.glucoseValueDao) + val therapyEventDao: TherapyEventDao = DelegatedTherapyEventDao(changes, database.therapyEventDao) + val temporaryBasalDao: TemporaryBasalDao = DelegatedTemporaryBasalDao(changes, database.temporaryBasalDao) + val bolusDao: BolusDao = DelegatedBolusDao(changes, database.bolusDao) + val extendedBolusDao: ExtendedBolusDao = DelegatedExtendedBolusDao(changes, database.extendedBolusDao) + val multiwaveBolusLinkDao: MultiwaveBolusLinkDao = DelegatedMultiwaveBolusLinkDao(changes, database.multiwaveBolusLinkDao) + val totalDailyDoseDao: TotalDailyDoseDao = DelegatedTotalDailyDoseDao(changes, database.totalDailyDoseDao) + val carbsDao: CarbsDao = DelegatedCarbsDao(changes, database.carbsDao) + val temporaryTargetDao: TemporaryTargetDao = DelegatedTemporaryTargetDao(changes, database.temporaryTargetDao) + val apsResultLinkDao: APSResultLinkDao = DelegatedAPSResultLinkDao(changes, database.apsResultLinkDao) + val bolusCalculatorResultDao: BolusCalculatorResultDao = DelegatedBolusCalculatorResultDao(changes, database.bolusCalculatorResultDao) + val effectiveProfileSwitchDao: EffectiveProfileSwitchDao = DelegatedEffectiveProfileSwitchDao(changes, database.effectiveProfileSwitchDao) + val profileSwitchDao: ProfileSwitchDao = DelegatedProfileSwitchDao(changes, database.profileSwitchDao) + val apsResultDao: APSResultDao = DelegatedAPSResultDao(changes, database.apsResultDao) + val versionChangeDao: VersionChangeDao = DelegatedVersionChangeDao(changes, database.versionChangeDao) + val userEntryDao: UserEntryDao = DelegatedUserEntryDao(changes, database.userEntryDao) + val preferenceChangeDao: PreferenceChangeDao = DelegatedPreferenceChangeDao(changes, database.preferenceChangeDao) + val foodDao: FoodDao = DelegatedFoodDao(changes, database.foodDao) + val deviceStatusDao: DeviceStatusDao = DelegatedDeviceStatusDao(changes, database.deviceStatusDao) + val offlineEventDao: OfflineEventDao = DelegatedOfflineEventDao(changes, database.offlineEventDao) + val heartRateDao: HeartRateDao = DelegatedHeartRateDao(changes, database.heartRateDao) + fun clearAllTables() = database.clearAllTables() +} diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/APSResultDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/APSResultDao.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/APSResultDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/APSResultDao.kt index ea287dd1b0..6c2a3e5ff9 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/APSResultDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/APSResultDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/APSResultLinkDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/APSResultLinkDao.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/APSResultLinkDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/APSResultLinkDao.kt index 2f7886ba99..e3bd0da37c 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/APSResultLinkDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/APSResultLinkDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/BolusCalculatorResultDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/BolusCalculatorResultDao.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/BolusCalculatorResultDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/BolusCalculatorResultDao.kt index 3fe0a07061..2887bbdcd1 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/BolusCalculatorResultDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/BolusCalculatorResultDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/BolusDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/BolusDao.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/BolusDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/BolusDao.kt index ae9941be0c..f3b57198dd 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/BolusDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/BolusDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/CarbsDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/CarbsDao.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/CarbsDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/CarbsDao.kt index 245a640091..e5b1b49f6a 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/CarbsDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/CarbsDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/DeviceStatusDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/DeviceStatusDao.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/DeviceStatusDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/DeviceStatusDao.kt index faa0f3499e..fb21eb6d54 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/DeviceStatusDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/DeviceStatusDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Insert diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/EffectiveProfileSwitchDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/EffectiveProfileSwitchDao.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/EffectiveProfileSwitchDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/EffectiveProfileSwitchDao.kt index dbd99030cd..29b2dacae0 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/EffectiveProfileSwitchDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/EffectiveProfileSwitchDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/ExtendedBolusDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/ExtendedBolusDao.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/ExtendedBolusDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/ExtendedBolusDao.kt index 57b7db53eb..80e2ce8884 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/ExtendedBolusDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/ExtendedBolusDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/FoodDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/FoodDao.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/FoodDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/FoodDao.kt index a0bb8682d3..2f1d99db9d 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/FoodDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/FoodDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/GlucoseValueDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/GlucoseValueDao.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/GlucoseValueDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/GlucoseValueDao.kt index d1f3ebea26..3eb9cf8de4 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/GlucoseValueDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/GlucoseValueDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/HeartRateDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/HeartRateDao.kt similarity index 96% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/HeartRateDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/HeartRateDao.kt index 4c450a9e37..78010f2197 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/HeartRateDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/HeartRateDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/MultiwaveBolusLinkDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/MultiwaveBolusLinkDao.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/MultiwaveBolusLinkDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/MultiwaveBolusLinkDao.kt index 1ec4abfdb3..151df4a73e 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/MultiwaveBolusLinkDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/MultiwaveBolusLinkDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/OfflineEventDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/OfflineEventDao.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/OfflineEventDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/OfflineEventDao.kt index 746c704d28..ebaa6cef05 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/OfflineEventDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/OfflineEventDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/PreferenceChangeDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/PreferenceChangeDao.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/PreferenceChangeDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/PreferenceChangeDao.kt index cd5a3cee4b..a4f91887fd 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/PreferenceChangeDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/PreferenceChangeDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Insert diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/ProfileSwitchDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/ProfileSwitchDao.kt similarity index 96% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/ProfileSwitchDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/ProfileSwitchDao.kt index 9139493380..cdba01a7a5 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/ProfileSwitchDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/ProfileSwitchDao.kt @@ -1,15 +1,16 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query import app.aaps.database.entities.ProfileSwitch import app.aaps.database.entities.TABLE_PROFILE_SWITCHES import app.aaps.database.entities.data.checkSanity +import app.aaps.database.impl.daos.workaround.ProfileSwitchDaoWorkaround import io.reactivex.rxjava3.core.Maybe import io.reactivex.rxjava3.core.Single @Dao -internal interface ProfileSwitchDao : info.nightscout.database.impl.daos.workaround.ProfileSwitchDaoWorkaround { +internal interface ProfileSwitchDao : ProfileSwitchDaoWorkaround { @Query("SELECT * FROM $TABLE_PROFILE_SWITCHES WHERE id = :id") override fun findById(id: Long): ProfileSwitch? diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/TemporaryBasalDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/TemporaryBasalDao.kt similarity index 99% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/TemporaryBasalDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/TemporaryBasalDao.kt index 0f01fdc340..83158d5dda 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/TemporaryBasalDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/TemporaryBasalDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/TemporaryTargetDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/TemporaryTargetDao.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/TemporaryTargetDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/TemporaryTargetDao.kt index 4cfee98587..e4317d3ee5 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/TemporaryTargetDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/TemporaryTargetDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/TherapyEventDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/TherapyEventDao.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/TherapyEventDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/TherapyEventDao.kt index 8e2ee77294..7afcb17c78 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/TherapyEventDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/TherapyEventDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/TotalDailyDoseDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/TotalDailyDoseDao.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/TotalDailyDoseDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/TotalDailyDoseDao.kt index 2bc9d64b3b..686981ccb9 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/TotalDailyDoseDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/TotalDailyDoseDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Query diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/TraceableDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/TraceableDao.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/TraceableDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/TraceableDao.kt index 1b6adc255e..ffea8d93f7 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/TraceableDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/TraceableDao.kt @@ -1,9 +1,9 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Insert import androidx.room.Update import app.aaps.database.entities.interfaces.TraceableDBEntry -import info.nightscout.database.impl.daos.workaround.TraceableDaoWorkaround +import app.aaps.database.impl.daos.workaround.TraceableDaoWorkaround internal interface TraceableDao : TraceableDaoWorkaround { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/UserEntryDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/UserEntryDao.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/UserEntryDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/UserEntryDao.kt index f03f2e684c..93de4fe7d9 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/UserEntryDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/UserEntryDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Insert diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/VersionChangeDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/VersionChangeDao.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/VersionChangeDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/VersionChangeDao.kt index 0f285f0dbc..5f2c33689f 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/VersionChangeDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/VersionChangeDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos +package app.aaps.database.impl.daos import androidx.room.Dao import androidx.room.Insert diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedAPSResultDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedAPSResultDao.kt similarity index 83% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedAPSResultDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedAPSResultDao.kt index 9d1a7dffed..f1421a36d3 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedAPSResultDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedAPSResultDao.kt @@ -1,7 +1,7 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.APSResultDao +import app.aaps.database.impl.daos.APSResultDao internal class DelegatedAPSResultDao(changes: MutableList, private val dao: APSResultDao) : DelegatedDao(changes), APSResultDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedAPSResultLinkDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedAPSResultLinkDao.kt similarity index 83% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedAPSResultLinkDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedAPSResultLinkDao.kt index 3d9208cf29..5bb85d6be1 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedAPSResultLinkDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedAPSResultLinkDao.kt @@ -1,7 +1,7 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.APSResultLinkDao +import app.aaps.database.impl.daos.APSResultLinkDao internal class DelegatedAPSResultLinkDao(changes: MutableList, private val dao: APSResultLinkDao) : DelegatedDao(changes), APSResultLinkDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedBolusCalculatorResultDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedBolusCalculatorResultDao.kt similarity index 83% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedBolusCalculatorResultDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedBolusCalculatorResultDao.kt index 57cec728bb..cb0945a0b1 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedBolusCalculatorResultDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedBolusCalculatorResultDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.BolusCalculatorResult import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.BolusCalculatorResultDao +import app.aaps.database.impl.daos.BolusCalculatorResultDao internal class DelegatedBolusCalculatorResultDao(changes: MutableList, private val dao: BolusCalculatorResultDao) : DelegatedDao(changes), BolusCalculatorResultDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedBolusDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedBolusDao.kt similarity index 82% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedBolusDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedBolusDao.kt index d076f75778..5cca3850d1 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedBolusDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedBolusDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.Bolus import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.BolusDao +import app.aaps.database.impl.daos.BolusDao internal class DelegatedBolusDao(changes: MutableList, private val dao: BolusDao) : DelegatedDao(changes), BolusDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedCarbsDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedCarbsDao.kt similarity index 82% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedCarbsDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedCarbsDao.kt index 704219997f..9642c32def 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedCarbsDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedCarbsDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.Carbs import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.CarbsDao +import app.aaps.database.impl.daos.CarbsDao internal class DelegatedCarbsDao(changes: MutableList, private val dao: CarbsDao) : DelegatedDao(changes), CarbsDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedDao.kt similarity index 79% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedDao.kt index 0fcb1d02ab..019b92c59a 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedDao.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.interfaces.DBEntry diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedDeviceStatusDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedDeviceStatusDao.kt similarity index 65% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedDeviceStatusDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedDeviceStatusDao.kt index 69512fefa8..d652395ac7 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedDeviceStatusDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedDeviceStatusDao.kt @@ -1,6 +1,6 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.DeviceStatusDao +import app.aaps.database.impl.daos.DeviceStatusDao internal class DelegatedDeviceStatusDao(changes: MutableList, private val dao: DeviceStatusDao) : DelegatedDao(changes), DeviceStatusDao by dao \ No newline at end of file diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedEffectiveProfileSwitchDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedEffectiveProfileSwitchDao.kt similarity index 83% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedEffectiveProfileSwitchDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedEffectiveProfileSwitchDao.kt index 994c4d0eb4..bac5d50ded 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedEffectiveProfileSwitchDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedEffectiveProfileSwitchDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.EffectiveProfileSwitch import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.EffectiveProfileSwitchDao +import app.aaps.database.impl.daos.EffectiveProfileSwitchDao internal class DelegatedEffectiveProfileSwitchDao(changes: MutableList, private val dao: EffectiveProfileSwitchDao) : DelegatedDao(changes), EffectiveProfileSwitchDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedExtendedBolusDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedExtendedBolusDao.kt similarity index 82% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedExtendedBolusDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedExtendedBolusDao.kt index deb3653907..48682f1eaf 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedExtendedBolusDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedExtendedBolusDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.ExtendedBolus import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.ExtendedBolusDao +import app.aaps.database.impl.daos.ExtendedBolusDao internal class DelegatedExtendedBolusDao(changes: MutableList, private val dao: ExtendedBolusDao) : DelegatedDao(changes), ExtendedBolusDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedFoodDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedFoodDao.kt similarity index 82% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedFoodDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedFoodDao.kt index bb3ceaf616..107d0dd4c9 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedFoodDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedFoodDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.Food import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.FoodDao +import app.aaps.database.impl.daos.FoodDao internal class DelegatedFoodDao(changes: MutableList, private val dao: FoodDao) : DelegatedDao(changes), FoodDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedGlucoseValueDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedGlucoseValueDao.kt similarity index 82% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedGlucoseValueDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedGlucoseValueDao.kt index b5015708a5..721ae94b0c 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedGlucoseValueDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedGlucoseValueDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.GlucoseValue import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.GlucoseValueDao +import app.aaps.database.impl.daos.GlucoseValueDao internal class DelegatedGlucoseValueDao(changes: MutableList, private val dao: GlucoseValueDao) : DelegatedDao(changes), GlucoseValueDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedHeartRateDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedHeartRateDao.kt similarity index 83% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedHeartRateDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedHeartRateDao.kt index 94be3da672..a8f01003ee 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedHeartRateDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedHeartRateDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.HeartRate import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.HeartRateDao +import app.aaps.database.impl.daos.HeartRateDao internal class DelegatedHeartRateDao( changes: MutableList, diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedMultiwaveBolusLinkDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedMultiwaveBolusLinkDao.kt similarity index 83% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedMultiwaveBolusLinkDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedMultiwaveBolusLinkDao.kt index 054a4e6edf..456901ce09 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedMultiwaveBolusLinkDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedMultiwaveBolusLinkDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.MultiwaveBolusLink import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.MultiwaveBolusLinkDao +import app.aaps.database.impl.daos.MultiwaveBolusLinkDao internal class DelegatedMultiwaveBolusLinkDao(changes: MutableList, private val dao: MultiwaveBolusLinkDao) : DelegatedDao(changes), MultiwaveBolusLinkDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedOfflineEventDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedOfflineEventDao.kt similarity index 82% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedOfflineEventDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedOfflineEventDao.kt index 9584a4f88b..f5898db9c7 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedOfflineEventDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedOfflineEventDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.OfflineEvent import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.OfflineEventDao +import app.aaps.database.impl.daos.OfflineEventDao internal class DelegatedOfflineEventDao(changes: MutableList, private val dao: OfflineEventDao) : DelegatedDao(changes), OfflineEventDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedPreferenceChangeDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedPreferenceChangeDao.kt similarity index 78% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedPreferenceChangeDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedPreferenceChangeDao.kt index 466329706b..0568bd8cc7 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedPreferenceChangeDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedPreferenceChangeDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.PreferenceChange import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.PreferenceChangeDao +import app.aaps.database.impl.daos.PreferenceChangeDao internal class DelegatedPreferenceChangeDao(changes: MutableList, private val dao: PreferenceChangeDao) : DelegatedDao(changes), PreferenceChangeDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedProfileSwitchDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedProfileSwitchDao.kt similarity index 82% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedProfileSwitchDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedProfileSwitchDao.kt index d3e0b5684a..e299768370 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedProfileSwitchDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedProfileSwitchDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.ProfileSwitch import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.ProfileSwitchDao +import app.aaps.database.impl.daos.ProfileSwitchDao internal class DelegatedProfileSwitchDao(changes: MutableList, private val dao: ProfileSwitchDao) : DelegatedDao(changes), ProfileSwitchDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedTemporaryBasalDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedTemporaryBasalDao.kt similarity index 83% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedTemporaryBasalDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedTemporaryBasalDao.kt index 17539d2a5e..cd0df6cafc 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedTemporaryBasalDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedTemporaryBasalDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.TemporaryBasal import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.TemporaryBasalDao +import app.aaps.database.impl.daos.TemporaryBasalDao internal class DelegatedTemporaryBasalDao(changes: MutableList, private val dao: TemporaryBasalDao) : DelegatedDao(changes), TemporaryBasalDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedTemporaryTargetDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedTemporaryTargetDao.kt similarity index 83% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedTemporaryTargetDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedTemporaryTargetDao.kt index 3951195567..4bf92a6d7e 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedTemporaryTargetDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedTemporaryTargetDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.TemporaryTargetDao +import app.aaps.database.impl.daos.TemporaryTargetDao internal class DelegatedTemporaryTargetDao(changes: MutableList, private val dao: TemporaryTargetDao) : DelegatedDao(changes), TemporaryTargetDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedTherapyEventDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedTherapyEventDao.kt similarity index 82% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedTherapyEventDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedTherapyEventDao.kt index 674d0b2b62..9aca3f466b 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedTherapyEventDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedTherapyEventDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.TherapyEventDao +import app.aaps.database.impl.daos.TherapyEventDao internal class DelegatedTherapyEventDao(changes: MutableList, private val dao: TherapyEventDao) : DelegatedDao(changes), TherapyEventDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedTotalDailyDoseDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedTotalDailyDoseDao.kt similarity index 83% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedTotalDailyDoseDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedTotalDailyDoseDao.kt index 4e86c03916..1debd6aef3 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedTotalDailyDoseDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedTotalDailyDoseDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.TotalDailyDose import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.TotalDailyDoseDao +import app.aaps.database.impl.daos.TotalDailyDoseDao internal class DelegatedTotalDailyDoseDao(changes: MutableList, private val dao: TotalDailyDoseDao) : DelegatedDao(changes), TotalDailyDoseDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedUserEntryDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedUserEntryDao.kt similarity index 77% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedUserEntryDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedUserEntryDao.kt index 4d2b52b3d3..e1c4e4dc67 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedUserEntryDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedUserEntryDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.UserEntry import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.UserEntryDao +import app.aaps.database.impl.daos.UserEntryDao internal class DelegatedUserEntryDao(changes: MutableList, private val dao: UserEntryDao) : DelegatedDao(changes), UserEntryDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedVersionChangeDao.kt b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedVersionChangeDao.kt similarity index 78% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedVersionChangeDao.kt rename to database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedVersionChangeDao.kt index 9130ab9edd..ad29af0542 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/delegated/DelegatedVersionChangeDao.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/delegated/DelegatedVersionChangeDao.kt @@ -1,8 +1,8 @@ -package info.nightscout.database.impl.daos.delegated +package app.aaps.database.impl.daos.delegated import app.aaps.database.entities.VersionChange import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.VersionChangeDao +import app.aaps.database.impl.daos.VersionChangeDao internal class DelegatedVersionChangeDao(changes: MutableList, private val dao: VersionChangeDao) : DelegatedDao(changes), VersionChangeDao by dao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/workaround/ProfileSwitchDaoWorkaround.java b/database/impl/src/main/java/app/aaps/database/impl/daos/workaround/ProfileSwitchDaoWorkaround.java similarity index 69% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/workaround/ProfileSwitchDaoWorkaround.java rename to database/impl/src/main/java/app/aaps/database/impl/daos/workaround/ProfileSwitchDaoWorkaround.java index 0dc1cb86f5..8f3bf89b50 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/workaround/ProfileSwitchDaoWorkaround.java +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/workaround/ProfileSwitchDaoWorkaround.java @@ -1,11 +1,11 @@ -package info.nightscout.database.impl.daos.workaround; +package app.aaps.database.impl.daos.workaround; import androidx.room.Transaction; import app.aaps.database.entities.ProfileSwitch; -import info.nightscout.database.impl.daos.ProfileSwitchDao; -import info.nightscout.database.impl.daos.ProfileSwitchDaoKt; -import info.nightscout.database.impl.daos.TraceableDao; +import app.aaps.database.impl.daos.ProfileSwitchDao; +import app.aaps.database.impl.daos.ProfileSwitchDaoKt; +import app.aaps.database.impl.daos.TraceableDao; public interface ProfileSwitchDaoWorkaround extends TraceableDao { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/workaround/TraceableDaoWorkaround.java b/database/impl/src/main/java/app/aaps/database/impl/daos/workaround/TraceableDaoWorkaround.java similarity index 81% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/workaround/TraceableDaoWorkaround.java rename to database/impl/src/main/java/app/aaps/database/impl/daos/workaround/TraceableDaoWorkaround.java index f84ded9aff..2549c03911 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/workaround/TraceableDaoWorkaround.java +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/workaround/TraceableDaoWorkaround.java @@ -1,10 +1,10 @@ -package info.nightscout.database.impl.daos.workaround; +package app.aaps.database.impl.daos.workaround; import androidx.room.Transaction; import app.aaps.database.entities.interfaces.TraceableDBEntry; -import info.nightscout.database.impl.daos.TraceableDao; -import info.nightscout.database.impl.daos.TraceableDaoKt; +import app.aaps.database.impl.daos.TraceableDao; +import app.aaps.database.impl.daos.TraceableDaoKt; // keep in java, it's easier public interface TraceableDaoWorkaround { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/daos/workaround/package-info.java b/database/impl/src/main/java/app/aaps/database/impl/daos/workaround/package-info.java similarity index 76% rename from database/impl/src/main/java/info/nightscout/database/impl/daos/workaround/package-info.java rename to database/impl/src/main/java/app/aaps/database/impl/daos/workaround/package-info.java index 5269c8bd8c..eb55555f6d 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/daos/workaround/package-info.java +++ b/database/impl/src/main/java/app/aaps/database/impl/daos/workaround/package-info.java @@ -2,4 +2,4 @@ * Workarounds until Kotlin is able to properly translate interface default methods while annotation processing. * See https://youtrack.jetbrains.com/issue/KT-25960 */ -package info.nightscout.database.impl.daos.workaround; \ No newline at end of file +package app.aaps.database.impl.daos.workaround; \ No newline at end of file diff --git a/database/impl/src/main/java/info/nightscout/database/impl/serialisation/SealedClassHelper.kt b/database/impl/src/main/java/app/aaps/database/impl/serialisation/SealedClassHelper.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/serialisation/SealedClassHelper.kt rename to database/impl/src/main/java/app/aaps/database/impl/serialisation/SealedClassHelper.kt index 3ef63cbaa4..cf12ad5407 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/serialisation/SealedClassHelper.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/serialisation/SealedClassHelper.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.serialisation +package app.aaps.database.impl.serialisation import com.google.gson.Gson import com.google.gson.GsonBuilder diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/CancelCurrentOfflineEventIfAnyTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/CancelCurrentOfflineEventIfAnyTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/CancelCurrentOfflineEventIfAnyTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/CancelCurrentOfflineEventIfAnyTransaction.kt index eaa8cc776e..3f04a9088d 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/CancelCurrentOfflineEventIfAnyTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/CancelCurrentOfflineEventIfAnyTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.OfflineEvent import app.aaps.database.entities.interfaces.end diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/CancelCurrentTemporaryTargetIfAnyTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/CancelCurrentTemporaryTargetIfAnyTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/CancelCurrentTemporaryTargetIfAnyTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/CancelCurrentTemporaryTargetIfAnyTransaction.kt index 60cc6c0a8e..832d827d63 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/CancelCurrentTemporaryTargetIfAnyTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/CancelCurrentTemporaryTargetIfAnyTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.interfaces.end diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/CgmSourceTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/CgmSourceTransaction.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/CgmSourceTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/CgmSourceTransaction.kt index 03976f0fa7..6a7d705a01 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/CgmSourceTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/CgmSourceTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.GlucoseValue import app.aaps.database.entities.TherapyEvent diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/CutCarbsTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/CutCarbsTransaction.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/CutCarbsTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/CutCarbsTransaction.kt index 608b645a91..7f2c8e5952 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/CutCarbsTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/CutCarbsTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Carbs import app.aaps.database.entities.interfaces.end diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertAndCancelCurrentOfflineEventTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertAndCancelCurrentOfflineEventTransaction.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertAndCancelCurrentOfflineEventTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertAndCancelCurrentOfflineEventTransaction.kt index be5f90c632..39defcc12c 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertAndCancelCurrentOfflineEventTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertAndCancelCurrentOfflineEventTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.OfflineEvent import app.aaps.database.entities.interfaces.end diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertAndCancelCurrentTemporaryTargetTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertAndCancelCurrentTemporaryTargetTransaction.kt similarity index 96% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertAndCancelCurrentTemporaryTargetTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertAndCancelCurrentTemporaryTargetTransaction.kt index 85ef76915e..c7c4bf1da9 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertAndCancelCurrentTemporaryTargetTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertAndCancelCurrentTemporaryTargetTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.interfaces.end diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertBolusWithTempIdTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertBolusWithTempIdTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertBolusWithTempIdTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertBolusWithTempIdTransaction.kt index da91b12de2..36c933ecf3 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertBolusWithTempIdTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertBolusWithTempIdTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Bolus diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertIfNewByTimestampCarbsTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertIfNewByTimestampCarbsTransaction.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertIfNewByTimestampCarbsTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertIfNewByTimestampCarbsTransaction.kt index 53cc53afc0..e5008b4037 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertIfNewByTimestampCarbsTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertIfNewByTimestampCarbsTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Carbs import app.aaps.database.entities.embedments.InterfaceIDs diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertIfNewByTimestampTherapyEventTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertIfNewByTimestampTherapyEventTransaction.kt similarity index 96% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertIfNewByTimestampTherapyEventTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertIfNewByTimestampTherapyEventTransaction.kt index d22797a322..180b1a0f1f 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertIfNewByTimestampTherapyEventTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertIfNewByTimestampTherapyEventTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TherapyEvent diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateBolusCalculatorResultTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateBolusCalculatorResultTransaction.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateBolusCalculatorResultTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateBolusCalculatorResultTransaction.kt index 7e2ffa6a15..e882aa7797 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateBolusCalculatorResultTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateBolusCalculatorResultTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.BolusCalculatorResult diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateBolusTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateBolusTransaction.kt similarity index 96% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateBolusTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateBolusTransaction.kt index 43cfa8d9d6..e42056a839 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateBolusTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateBolusTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Bolus import app.aaps.database.entities.embedments.InsulinConfiguration diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateCarbsTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateCarbsTransaction.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateCarbsTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateCarbsTransaction.kt index 8e697a4d3f..14c4faefbb 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateCarbsTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateCarbsTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Carbs import app.aaps.database.entities.embedments.InterfaceIDs diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateFoodTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateFoodTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateFoodTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateFoodTransaction.kt index 2053989200..8a29a9948c 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateFoodTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateFoodTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Food diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateHeartRateTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateHeartRateTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateHeartRateTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateHeartRateTransaction.kt index 26560f0674..c9c56975b6 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateHeartRateTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateHeartRateTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.HeartRate diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateProfileSwitch.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateProfileSwitch.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateProfileSwitch.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateProfileSwitch.kt index d9a4f50778..f4409d385d 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertOrUpdateProfileSwitch.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertOrUpdateProfileSwitch.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.ProfileSwitch diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertTemporaryBasalWithTempIdTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertTemporaryBasalWithTempIdTransaction.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertTemporaryBasalWithTempIdTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertTemporaryBasalWithTempIdTransaction.kt index 196e9acd5a..cb9836dd5f 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertTemporaryBasalWithTempIdTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertTemporaryBasalWithTempIdTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryBasal diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertTherapyEventAnnouncementTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertTherapyEventAnnouncementTransaction.kt similarity index 96% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertTherapyEventAnnouncementTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InsertTherapyEventAnnouncementTransaction.kt index 6afb417759..9f74d0a3d4 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InsertTherapyEventAnnouncementTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InsertTherapyEventAnnouncementTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.embedments.InterfaceIDs diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateAAPSStartedTherapyEventTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateAAPSStartedTherapyEventTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateAAPSStartedTherapyEventTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateAAPSStartedTherapyEventTransaction.kt index 309ee6b56f..021593a9d7 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateAAPSStartedTherapyEventTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateAAPSStartedTherapyEventTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TherapyEvent diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateBolusCalculatorResultTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateBolusCalculatorResultTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateBolusCalculatorResultTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateBolusCalculatorResultTransaction.kt index dc7435741b..c080ecbe48 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateBolusCalculatorResultTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateBolusCalculatorResultTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.BolusCalculatorResult diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateBolusTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateBolusTransaction.kt similarity index 92% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateBolusTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateBolusTransaction.kt index dffab31840..a73037b0a8 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateBolusTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateBolusTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions class InvalidateBolusTransaction(val id: Long) : Transaction() { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateCarbsTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateCarbsTransaction.kt similarity index 92% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateCarbsTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateCarbsTransaction.kt index 8bad38ee15..f9494461d2 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateCarbsTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateCarbsTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Carbs diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateEffectiveProfileSwitchTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateEffectiveProfileSwitchTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateEffectiveProfileSwitchTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateEffectiveProfileSwitchTransaction.kt index 465b11194b..f72ea580c7 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateEffectiveProfileSwitchTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateEffectiveProfileSwitchTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.EffectiveProfileSwitch diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateExtendedBolusTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateExtendedBolusTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateExtendedBolusTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateExtendedBolusTransaction.kt index 3a2d0caea3..3b69d0e175 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateExtendedBolusTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateExtendedBolusTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.ExtendedBolus diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateFoodTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateFoodTransaction.kt similarity index 87% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateFoodTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateFoodTransaction.kt index f43e184611..103da70bca 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateFoodTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateFoodTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions class InvalidateFoodTransaction(val id: Long) : Transaction() { diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateGlucoseValueTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateGlucoseValueTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateGlucoseValueTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateGlucoseValueTransaction.kt index b5692f8d89..c45028c58e 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateGlucoseValueTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateGlucoseValueTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.GlucoseValue diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateOfflineEventTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateOfflineEventTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateOfflineEventTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateOfflineEventTransaction.kt index bba982c5de..a9016cdf0f 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateOfflineEventTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateOfflineEventTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.OfflineEvent diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateProfileSwitchTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateProfileSwitchTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateProfileSwitchTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateProfileSwitchTransaction.kt index 72c280a3f9..3958409878 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateProfileSwitchTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateProfileSwitchTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.ProfileSwitch diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTemporaryBasalTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTemporaryBasalTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTemporaryBasalTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTemporaryBasalTransaction.kt index 1bbd359fad..28bc25e9fa 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTemporaryBasalTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTemporaryBasalTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryBasal diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTemporaryBasalTransactionWithPumpId.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTemporaryBasalTransactionWithPumpId.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTemporaryBasalTransactionWithPumpId.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTemporaryBasalTransactionWithPumpId.kt index 83b512aeff..65f270be4d 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTemporaryBasalTransactionWithPumpId.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTemporaryBasalTransactionWithPumpId.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryBasal import app.aaps.database.entities.embedments.InterfaceIDs diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTemporaryBasalWithTempIdTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTemporaryBasalWithTempIdTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTemporaryBasalWithTempIdTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTemporaryBasalWithTempIdTransaction.kt index 8780520646..b638567f2a 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTemporaryBasalWithTempIdTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTemporaryBasalWithTempIdTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryBasal diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTemporaryTargetTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTemporaryTargetTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTemporaryTargetTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTemporaryTargetTransaction.kt index b09732e98b..e6e6f6592d 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTemporaryTargetTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTemporaryTargetTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryTarget diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTherapyEventTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTherapyEventTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTherapyEventTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTherapyEventTransaction.kt index b6ad3aa242..97230526ab 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/InvalidateTherapyEventTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/InvalidateTherapyEventTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TherapyEvent diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncBolusWithTempIdTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncBolusWithTempIdTransaction.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncBolusWithTempIdTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncBolusWithTempIdTransaction.kt index f3cdc928e5..b4c46a70fa 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncBolusWithTempIdTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncBolusWithTempIdTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Bolus diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsBolusCalculatorResultTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsBolusCalculatorResultTransaction.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsBolusCalculatorResultTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsBolusCalculatorResultTransaction.kt index 1ee13c0b7a..ee9b91d729 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsBolusCalculatorResultTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsBolusCalculatorResultTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.BolusCalculatorResult diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsBolusTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsBolusTransaction.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsBolusTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsBolusTransaction.kt index a18655e488..6d62e83fc1 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsBolusTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsBolusTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Bolus diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsCarbsTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsCarbsTransaction.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsCarbsTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsCarbsTransaction.kt index d2088ab52e..92a29f64ff 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsCarbsTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsCarbsTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Carbs diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsEffectiveProfileSwitchTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsEffectiveProfileSwitchTransaction.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsEffectiveProfileSwitchTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsEffectiveProfileSwitchTransaction.kt index 37e1ddfd70..4829fe9afe 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsEffectiveProfileSwitchTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsEffectiveProfileSwitchTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.EffectiveProfileSwitch diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsExtendedBolusTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsExtendedBolusTransaction.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsExtendedBolusTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsExtendedBolusTransaction.kt index 50b61555a1..3df1bc0bd8 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsExtendedBolusTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsExtendedBolusTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.ExtendedBolus import app.aaps.database.entities.interfaces.end diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsFoodTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsFoodTransaction.kt similarity index 96% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsFoodTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsFoodTransaction.kt index 2ea6b862f5..687e613f7c 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsFoodTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsFoodTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Food diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsOfflineEventTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsOfflineEventTransaction.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsOfflineEventTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsOfflineEventTransaction.kt index 9143580ac4..1bbafd4734 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsOfflineEventTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsOfflineEventTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.OfflineEvent import app.aaps.database.entities.interfaces.end diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsProfileSwitchTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsProfileSwitchTransaction.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsProfileSwitchTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsProfileSwitchTransaction.kt index e4ec08688f..a419407d15 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsProfileSwitchTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsProfileSwitchTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.ProfileSwitch diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsTemporaryBasalTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsTemporaryBasalTransaction.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsTemporaryBasalTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsTemporaryBasalTransaction.kt index 5be241d04c..aacbfc4922 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsTemporaryBasalTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsTemporaryBasalTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryBasal import app.aaps.database.entities.interfaces.end diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsTemporaryTargetTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsTemporaryTargetTransaction.kt similarity index 98% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsTemporaryTargetTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsTemporaryTargetTransaction.kt index c7f2e427a9..e3d54aa632 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsTemporaryTargetTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsTemporaryTargetTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.interfaces.end diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsTherapyEventTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsTherapyEventTransaction.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsTherapyEventTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsTherapyEventTransaction.kt index 55e0809738..c1e91ccf9b 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncNsTherapyEventTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncNsTherapyEventTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TherapyEvent diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpBolusTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpBolusTransaction.kt similarity index 96% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpBolusTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpBolusTransaction.kt index 018e79ca62..e11974db7e 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpBolusTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpBolusTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Bolus diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpCancelExtendedBolusIfAnyTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpCancelExtendedBolusIfAnyTransaction.kt similarity index 96% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpCancelExtendedBolusIfAnyTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpCancelExtendedBolusIfAnyTransaction.kt index b08dfd5de2..aa3298abc2 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpCancelExtendedBolusIfAnyTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpCancelExtendedBolusIfAnyTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.ExtendedBolus import app.aaps.database.entities.embedments.InterfaceIDs diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpCancelTemporaryBasalIfAnyTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpCancelTemporaryBasalIfAnyTransaction.kt similarity index 96% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpCancelTemporaryBasalIfAnyTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpCancelTemporaryBasalIfAnyTransaction.kt index c2dd0d4d26..0c7aac7279 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpCancelTemporaryBasalIfAnyTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpCancelTemporaryBasalIfAnyTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryBasal import app.aaps.database.entities.embedments.InterfaceIDs diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpExtendedBolusTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpExtendedBolusTransaction.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpExtendedBolusTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpExtendedBolusTransaction.kt index d10d00bc07..84d759af8a 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpExtendedBolusTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpExtendedBolusTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.ExtendedBolus import app.aaps.database.entities.interfaces.end diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpTemporaryBasalTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpTemporaryBasalTransaction.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpTemporaryBasalTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpTemporaryBasalTransaction.kt index 8d02d321bd..4d40a6ac18 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpTemporaryBasalTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpTemporaryBasalTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryBasal import app.aaps.database.entities.interfaces.end diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpTotalDailyDoseTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpTotalDailyDoseTransaction.kt similarity index 97% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpTotalDailyDoseTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpTotalDailyDoseTransaction.kt index 35bc6ca1ec..24ea82c2c0 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncPumpTotalDailyDoseTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncPumpTotalDailyDoseTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TotalDailyDose diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncTemporaryBasalWithTempIdTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncTemporaryBasalWithTempIdTransaction.kt similarity index 96% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncTemporaryBasalWithTempIdTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/SyncTemporaryBasalWithTempIdTransaction.kt index 9d3ea24069..2bc56a1c7b 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/SyncTemporaryBasalWithTempIdTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/SyncTemporaryBasalWithTempIdTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryBasal diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/Transaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/Transaction.kt similarity index 71% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/Transaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/Transaction.kt index 3ba635334f..96d4b14f3b 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/Transaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/Transaction.kt @@ -1,6 +1,6 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions -import info.nightscout.database.impl.DelegatedAppDatabase +import app.aaps.database.impl.DelegatedAppDatabase /** * Base class for database transactions diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateGlucoseValueTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateGlucoseValueTransaction.kt similarity index 84% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateGlucoseValueTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateGlucoseValueTransaction.kt index b2bc0820ca..c419966516 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateGlucoseValueTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateGlucoseValueTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.GlucoseValue diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdBolusCalculatorResultTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdBolusCalculatorResultTransaction.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdBolusCalculatorResultTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdBolusCalculatorResultTransaction.kt index 690cf850db..4d47706ff1 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdBolusCalculatorResultTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdBolusCalculatorResultTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.BolusCalculatorResult diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdBolusTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdBolusTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdBolusTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdBolusTransaction.kt index fb0da68bea..fa7b07f4de 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdBolusTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdBolusTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Bolus diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdCarbsTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdCarbsTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdCarbsTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdCarbsTransaction.kt index 622dd9e94f..0a26ab4488 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdCarbsTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdCarbsTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Carbs diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdDeviceStatusTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdDeviceStatusTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdDeviceStatusTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdDeviceStatusTransaction.kt index c061b109d9..d82412ce1e 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdDeviceStatusTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdDeviceStatusTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.DeviceStatus diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdEffectiveProfileSwitchTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdEffectiveProfileSwitchTransaction.kt similarity index 95% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdEffectiveProfileSwitchTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdEffectiveProfileSwitchTransaction.kt index 6c3f98382e..85e9863def 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdEffectiveProfileSwitchTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdEffectiveProfileSwitchTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.EffectiveProfileSwitch diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdExtendedBolusTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdExtendedBolusTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdExtendedBolusTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdExtendedBolusTransaction.kt index 4258ccc1ce..19f3172228 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdExtendedBolusTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdExtendedBolusTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.ExtendedBolus diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdFoodTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdFoodTransaction.kt similarity index 93% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdFoodTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdFoodTransaction.kt index 29cd5f4805..25d5d48da2 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdFoodTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdFoodTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.Food diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdGlucoseValueTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdGlucoseValueTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdGlucoseValueTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdGlucoseValueTransaction.kt index ed8e7895a9..6d808e35a8 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdGlucoseValueTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdGlucoseValueTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.GlucoseValue diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdOfflineEventTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdOfflineEventTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdOfflineEventTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdOfflineEventTransaction.kt index 771c7c402f..c5ec98990d 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdOfflineEventTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdOfflineEventTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.OfflineEvent diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdProfileSwitchTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdProfileSwitchTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdProfileSwitchTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdProfileSwitchTransaction.kt index eebb05ae07..63242272a2 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdProfileSwitchTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdProfileSwitchTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.ProfileSwitch diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdTemporaryBasalTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdTemporaryBasalTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdTemporaryBasalTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdTemporaryBasalTransaction.kt index 4d09720c91..fa8e86db28 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdTemporaryBasalTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdTemporaryBasalTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryBasal diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdTemporaryTargetTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdTemporaryTargetTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdTemporaryTargetTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdTemporaryTargetTransaction.kt index a1a2f0340f..28ac5f8d55 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdTemporaryTargetTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdTemporaryTargetTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TemporaryTarget diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdTherapyEventTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdTherapyEventTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdTherapyEventTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdTherapyEventTransaction.kt index f3e1d06952..5c85e58c9b 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UpdateNsIdTherapyEventTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UpdateNsIdTherapyEventTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.TherapyEvent diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UserEntryTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/UserEntryTransaction.kt similarity index 85% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/UserEntryTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/UserEntryTransaction.kt index 1be3c14a92..6f7605f303 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/UserEntryTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/UserEntryTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.UserEntry diff --git a/database/impl/src/main/java/info/nightscout/database/impl/transactions/VersionChangeTransaction.kt b/database/impl/src/main/java/app/aaps/database/impl/transactions/VersionChangeTransaction.kt similarity index 94% rename from database/impl/src/main/java/info/nightscout/database/impl/transactions/VersionChangeTransaction.kt rename to database/impl/src/main/java/app/aaps/database/impl/transactions/VersionChangeTransaction.kt index 9dddb17e91..7024c36c7a 100644 --- a/database/impl/src/main/java/info/nightscout/database/impl/transactions/VersionChangeTransaction.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/transactions/VersionChangeTransaction.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.impl.transactions +package app.aaps.database.impl.transactions import app.aaps.database.entities.VersionChange diff --git a/database/impl/src/main/java/info/nightscout/database/impl/DelegatedAppDatabase.kt b/database/impl/src/main/java/info/nightscout/database/impl/DelegatedAppDatabase.kt deleted file mode 100644 index 2748dcf9a6..0000000000 --- a/database/impl/src/main/java/info/nightscout/database/impl/DelegatedAppDatabase.kt +++ /dev/null @@ -1,71 +0,0 @@ -package info.nightscout.database.impl - -import app.aaps.database.entities.interfaces.DBEntry -import info.nightscout.database.impl.daos.APSResultDao -import info.nightscout.database.impl.daos.APSResultLinkDao -import info.nightscout.database.impl.daos.BolusCalculatorResultDao -import info.nightscout.database.impl.daos.BolusDao -import info.nightscout.database.impl.daos.CarbsDao -import info.nightscout.database.impl.daos.DeviceStatusDao -import info.nightscout.database.impl.daos.EffectiveProfileSwitchDao -import info.nightscout.database.impl.daos.ExtendedBolusDao -import info.nightscout.database.impl.daos.FoodDao -import info.nightscout.database.impl.daos.GlucoseValueDao -import info.nightscout.database.impl.daos.HeartRateDao -import info.nightscout.database.impl.daos.MultiwaveBolusLinkDao -import info.nightscout.database.impl.daos.OfflineEventDao -import info.nightscout.database.impl.daos.PreferenceChangeDao -import info.nightscout.database.impl.daos.ProfileSwitchDao -import info.nightscout.database.impl.daos.TemporaryBasalDao -import info.nightscout.database.impl.daos.TemporaryTargetDao -import info.nightscout.database.impl.daos.TherapyEventDao -import info.nightscout.database.impl.daos.TotalDailyDoseDao -import info.nightscout.database.impl.daos.UserEntryDao -import info.nightscout.database.impl.daos.VersionChangeDao -import info.nightscout.database.impl.daos.delegated.DelegatedAPSResultDao -import info.nightscout.database.impl.daos.delegated.DelegatedAPSResultLinkDao -import info.nightscout.database.impl.daos.delegated.DelegatedBolusCalculatorResultDao -import info.nightscout.database.impl.daos.delegated.DelegatedBolusDao -import info.nightscout.database.impl.daos.delegated.DelegatedCarbsDao -import info.nightscout.database.impl.daos.delegated.DelegatedDeviceStatusDao -import info.nightscout.database.impl.daos.delegated.DelegatedEffectiveProfileSwitchDao -import info.nightscout.database.impl.daos.delegated.DelegatedExtendedBolusDao -import info.nightscout.database.impl.daos.delegated.DelegatedFoodDao -import info.nightscout.database.impl.daos.delegated.DelegatedGlucoseValueDao -import info.nightscout.database.impl.daos.delegated.DelegatedHeartRateDao -import info.nightscout.database.impl.daos.delegated.DelegatedMultiwaveBolusLinkDao -import info.nightscout.database.impl.daos.delegated.DelegatedOfflineEventDao -import info.nightscout.database.impl.daos.delegated.DelegatedPreferenceChangeDao -import info.nightscout.database.impl.daos.delegated.DelegatedProfileSwitchDao -import info.nightscout.database.impl.daos.delegated.DelegatedTemporaryBasalDao -import info.nightscout.database.impl.daos.delegated.DelegatedTemporaryTargetDao -import info.nightscout.database.impl.daos.delegated.DelegatedTherapyEventDao -import info.nightscout.database.impl.daos.delegated.DelegatedTotalDailyDoseDao -import info.nightscout.database.impl.daos.delegated.DelegatedUserEntryDao -import info.nightscout.database.impl.daos.delegated.DelegatedVersionChangeDao - -internal class DelegatedAppDatabase(val changes: MutableList, val database: AppDatabase) { - - val glucoseValueDao: GlucoseValueDao = DelegatedGlucoseValueDao(changes, database.glucoseValueDao) - val therapyEventDao: TherapyEventDao = DelegatedTherapyEventDao(changes, database.therapyEventDao) - val temporaryBasalDao: TemporaryBasalDao = DelegatedTemporaryBasalDao(changes, database.temporaryBasalDao) - val bolusDao: BolusDao = DelegatedBolusDao(changes, database.bolusDao) - val extendedBolusDao: ExtendedBolusDao = DelegatedExtendedBolusDao(changes, database.extendedBolusDao) - val multiwaveBolusLinkDao: MultiwaveBolusLinkDao = DelegatedMultiwaveBolusLinkDao(changes, database.multiwaveBolusLinkDao) - val totalDailyDoseDao: TotalDailyDoseDao = DelegatedTotalDailyDoseDao(changes, database.totalDailyDoseDao) - val carbsDao: CarbsDao = DelegatedCarbsDao(changes, database.carbsDao) - val temporaryTargetDao: TemporaryTargetDao = DelegatedTemporaryTargetDao(changes, database.temporaryTargetDao) - val apsResultLinkDao: APSResultLinkDao = DelegatedAPSResultLinkDao(changes, database.apsResultLinkDao) - val bolusCalculatorResultDao: BolusCalculatorResultDao = DelegatedBolusCalculatorResultDao(changes, database.bolusCalculatorResultDao) - val effectiveProfileSwitchDao: EffectiveProfileSwitchDao = DelegatedEffectiveProfileSwitchDao(changes, database.effectiveProfileSwitchDao) - val profileSwitchDao: ProfileSwitchDao = DelegatedProfileSwitchDao(changes, database.profileSwitchDao) - val apsResultDao: APSResultDao = DelegatedAPSResultDao(changes, database.apsResultDao) - val versionChangeDao: VersionChangeDao = DelegatedVersionChangeDao(changes, database.versionChangeDao) - val userEntryDao: UserEntryDao = DelegatedUserEntryDao(changes, database.userEntryDao) - val preferenceChangeDao: PreferenceChangeDao = DelegatedPreferenceChangeDao(changes, database.preferenceChangeDao) - val foodDao: FoodDao = DelegatedFoodDao(changes, database.foodDao) - val deviceStatusDao: DeviceStatusDao = DelegatedDeviceStatusDao(changes, database.deviceStatusDao) - val offlineEventDao: OfflineEventDao = DelegatedOfflineEventDao(changes, database.offlineEventDao) - val heartRateDao: HeartRateDao = DelegatedHeartRateDao(changes, database.heartRateDao) - fun clearAllTables() = database.clearAllTables() -} diff --git a/database/impl/src/release/java/info/nightscout/database/annotations/DbOpenForTesting.kt b/database/impl/src/release/kotlin/app/aaps/database/annotations/DbOpenForTesting.kt similarity index 81% rename from database/impl/src/release/java/info/nightscout/database/annotations/DbOpenForTesting.kt rename to database/impl/src/release/kotlin/app/aaps/database/annotations/DbOpenForTesting.kt index b22fa11e2f..f00a7a2ff0 100644 --- a/database/impl/src/release/java/info/nightscout/database/annotations/DbOpenForTesting.kt +++ b/database/impl/src/release/kotlin/app/aaps/database/annotations/DbOpenForTesting.kt @@ -1,4 +1,4 @@ -package info.nightscout.database.annotations +package app.aaps.database.annotations /** * Annotate a class with [DbOpenForTesting] if it should be extendable for testing. diff --git a/implementation/src/main/kotlin/app/aaps/implementation/alerts/LocalAlertUtilsImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/alerts/LocalAlertUtilsImpl.kt index 54cae16e54..716007167c 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/alerts/LocalAlertUtilsImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/alerts/LocalAlertUtilsImpl.kt @@ -22,8 +22,8 @@ import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertTherapyEventAnnouncementTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertTherapyEventAnnouncementTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/implementation/src/main/kotlin/app/aaps/implementation/db/CompatDBHelper.kt b/implementation/src/main/kotlin/app/aaps/implementation/db/CompatDBHelper.kt index d27bcc4eca..29ec402258 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/db/CompatDBHelper.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/db/CompatDBHelper.kt @@ -30,7 +30,7 @@ import app.aaps.database.entities.ProfileSwitch import app.aaps.database.entities.TemporaryBasal import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.TherapyEvent -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import io.reactivex.rxjava3.disposables.Disposable import javax.inject.Inject import javax.inject.Singleton diff --git a/implementation/src/main/kotlin/app/aaps/implementation/db/PersistenceLayerImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/db/PersistenceLayerImpl.kt index c52ea63442..5d14a7a871 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/db/PersistenceLayerImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/db/PersistenceLayerImpl.kt @@ -12,12 +12,12 @@ import app.aaps.database.entities.Carbs import app.aaps.database.entities.EffectiveProfileSwitch import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.UserEntry +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertOrUpdateBolusCalculatorResultTransaction +import app.aaps.database.impl.transactions.InsertOrUpdateBolusTransaction +import app.aaps.database.impl.transactions.InsertOrUpdateCarbsTransaction import dagger.Reusable import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertOrUpdateBolusCalculatorResultTransaction -import info.nightscout.database.impl.transactions.InsertOrUpdateBolusTransaction -import info.nightscout.database.impl.transactions.InsertOrUpdateCarbsTransaction import io.reactivex.rxjava3.core.Single import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/implementation/src/main/kotlin/app/aaps/implementation/logging/UserEntryLoggerImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/logging/UserEntryLoggerImpl.kt index 01de79653b..c091103176 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/logging/UserEntryLoggerImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/logging/UserEntryLoggerImpl.kt @@ -11,9 +11,9 @@ import app.aaps.database.entities.UserEntry import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.UserEntryTransaction import dagger.Reusable -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.UserEntryTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/implementation/src/main/kotlin/app/aaps/implementation/overview/OverviewDataImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/overview/OverviewDataImpl.kt index 35f65be2e6..d5654ba01e 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/overview/OverviewDataImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/overview/OverviewDataImpl.kt @@ -36,10 +36,10 @@ import app.aaps.core.main.iob.round import app.aaps.database.ValueWrapper import app.aaps.database.entities.GlucoseValue import app.aaps.database.entities.TemporaryTarget +import app.aaps.database.impl.AppRepository import com.jjoe64.graphview.series.BarGraphSeries import com.jjoe64.graphview.series.DataPoint import com.jjoe64.graphview.series.LineGraphSeries -import info.nightscout.database.impl.AppRepository import java.util.Calendar import javax.inject.Inject import javax.inject.Singleton diff --git a/implementation/src/main/kotlin/app/aaps/implementation/profile/ProfileFunctionImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/profile/ProfileFunctionImpl.kt index 8aab6075cc..36fce02347 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/profile/ProfileFunctionImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/profile/ProfileFunctionImpl.kt @@ -22,8 +22,8 @@ import app.aaps.core.main.profile.ProfileSealed import app.aaps.core.main.utils.fabric.FabricPrivacy import app.aaps.database.ValueWrapper import app.aaps.database.entities.ProfileSwitch -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertOrUpdateProfileSwitch +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertOrUpdateProfileSwitch import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.concurrent.ConcurrentHashMap diff --git a/implementation/src/main/kotlin/app/aaps/implementation/pump/PumpSyncImplementation.kt b/implementation/src/main/kotlin/app/aaps/implementation/pump/PumpSyncImplementation.kt index f0e9b1ee8c..fdcd4bdad5 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/pump/PumpSyncImplementation.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/pump/PumpSyncImplementation.kt @@ -29,23 +29,23 @@ import app.aaps.database.entities.TotalDailyDose import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit import app.aaps.database.entities.embedments.InterfaceIDs -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertBolusWithTempIdTransaction -import info.nightscout.database.impl.transactions.InsertIfNewByTimestampCarbsTransaction -import info.nightscout.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction -import info.nightscout.database.impl.transactions.InsertTemporaryBasalWithTempIdTransaction -import info.nightscout.database.impl.transactions.InsertTherapyEventAnnouncementTransaction -import info.nightscout.database.impl.transactions.InvalidateTemporaryBasalTransaction -import info.nightscout.database.impl.transactions.InvalidateTemporaryBasalTransactionWithPumpId -import info.nightscout.database.impl.transactions.InvalidateTemporaryBasalWithTempIdTransaction -import info.nightscout.database.impl.transactions.SyncBolusWithTempIdTransaction -import info.nightscout.database.impl.transactions.SyncPumpBolusTransaction -import info.nightscout.database.impl.transactions.SyncPumpCancelExtendedBolusIfAnyTransaction -import info.nightscout.database.impl.transactions.SyncPumpCancelTemporaryBasalIfAnyTransaction -import info.nightscout.database.impl.transactions.SyncPumpExtendedBolusTransaction -import info.nightscout.database.impl.transactions.SyncPumpTemporaryBasalTransaction -import info.nightscout.database.impl.transactions.SyncPumpTotalDailyDoseTransaction -import info.nightscout.database.impl.transactions.SyncTemporaryBasalWithTempIdTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertBolusWithTempIdTransaction +import app.aaps.database.impl.transactions.InsertIfNewByTimestampCarbsTransaction +import app.aaps.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction +import app.aaps.database.impl.transactions.InsertTemporaryBasalWithTempIdTransaction +import app.aaps.database.impl.transactions.InsertTherapyEventAnnouncementTransaction +import app.aaps.database.impl.transactions.InvalidateTemporaryBasalTransaction +import app.aaps.database.impl.transactions.InvalidateTemporaryBasalTransactionWithPumpId +import app.aaps.database.impl.transactions.InvalidateTemporaryBasalWithTempIdTransaction +import app.aaps.database.impl.transactions.SyncBolusWithTempIdTransaction +import app.aaps.database.impl.transactions.SyncPumpBolusTransaction +import app.aaps.database.impl.transactions.SyncPumpCancelExtendedBolusIfAnyTransaction +import app.aaps.database.impl.transactions.SyncPumpCancelTemporaryBasalIfAnyTransaction +import app.aaps.database.impl.transactions.SyncPumpExtendedBolusTransaction +import app.aaps.database.impl.transactions.SyncPumpTemporaryBasalTransaction +import app.aaps.database.impl.transactions.SyncPumpTotalDailyDoseTransaction +import app.aaps.database.impl.transactions.SyncTemporaryBasalWithTempIdTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/implementation/src/main/kotlin/app/aaps/implementation/queue/CommandQueueImplementation.kt b/implementation/src/main/kotlin/app/aaps/implementation/queue/CommandQueueImplementation.kt index 7ddd2d8b73..08ac386f23 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/queue/CommandQueueImplementation.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/queue/CommandQueueImplementation.kt @@ -48,6 +48,7 @@ import app.aaps.database.ValueWrapper import app.aaps.database.entities.EffectiveProfileSwitch import app.aaps.database.entities.ProfileSwitch import app.aaps.database.entities.interfaces.end +import app.aaps.database.impl.AppRepository import app.aaps.implementation.R import app.aaps.implementation.queue.commands.CommandBolus import app.aaps.implementation.queue.commands.CommandCancelExtendedBolus @@ -70,7 +71,6 @@ import app.aaps.implementation.queue.commands.CommandTempBasalAbsolute import app.aaps.implementation.queue.commands.CommandTempBasalPercent import app.aaps.implementation.queue.commands.CommandUpdateTime import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.LinkedList diff --git a/implementation/src/main/kotlin/app/aaps/implementation/queue/commands/CommandSMBBolus.kt b/implementation/src/main/kotlin/app/aaps/implementation/queue/commands/CommandSMBBolus.kt index f271ec279d..fff4b7f87f 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/queue/commands/CommandSMBBolus.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/queue/commands/CommandSMBBolus.kt @@ -8,8 +8,8 @@ import app.aaps.core.interfaces.queue.Callback import app.aaps.core.interfaces.queue.Command import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.T +import app.aaps.database.impl.AppRepository import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import javax.inject.Inject class CommandSMBBolus( diff --git a/implementation/src/main/kotlin/app/aaps/implementation/queue/commands/CommandSetProfile.kt b/implementation/src/main/kotlin/app/aaps/implementation/queue/commands/CommandSetProfile.kt index 9a58634722..4667fc0e04 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/queue/commands/CommandSetProfile.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/queue/commands/CommandSetProfile.kt @@ -11,8 +11,8 @@ import app.aaps.core.interfaces.queue.CommandQueue import app.aaps.core.interfaces.smsCommunicator.SmsCommunicator import app.aaps.core.interfaces.utils.DateUtil import app.aaps.database.ValueWrapper +import app.aaps.database.impl.AppRepository import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import javax.inject.Inject class CommandSetProfile( diff --git a/implementation/src/main/kotlin/app/aaps/implementation/stats/DexcomTirCalculatorImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/stats/DexcomTirCalculatorImpl.kt index a77ce3d282..f262c18d7b 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/stats/DexcomTirCalculatorImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/stats/DexcomTirCalculatorImpl.kt @@ -10,7 +10,7 @@ import app.aaps.core.interfaces.stats.DexcomTirCalculator import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.MidnightTime import app.aaps.core.interfaces.utils.T -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import javax.inject.Inject import javax.inject.Singleton diff --git a/implementation/src/main/kotlin/app/aaps/implementation/stats/TddCalculatorImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/stats/TddCalculatorImpl.kt index fa4e52e27a..6cd60c4ec9 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/stats/TddCalculatorImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/stats/TddCalculatorImpl.kt @@ -23,7 +23,7 @@ import app.aaps.database.ValueWrapper import app.aaps.database.entities.Bolus import app.aaps.database.entities.TotalDailyDose import app.aaps.database.entities.embedments.InterfaceIDs -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import javax.inject.Inject import javax.inject.Singleton diff --git a/implementation/src/main/kotlin/app/aaps/implementation/stats/TirCalculatorImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/stats/TirCalculatorImpl.kt index e2087199dc..a88454bbed 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/stats/TirCalculatorImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/stats/TirCalculatorImpl.kt @@ -16,7 +16,7 @@ import app.aaps.core.interfaces.stats.TirCalculator import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.MidnightTime import app.aaps.core.interfaces.utils.T -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import javax.inject.Inject import javax.inject.Singleton diff --git a/implementation/src/main/kotlin/app/aaps/implementation/utils/HardLimitsImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/utils/HardLimitsImpl.kt index e514c94e75..6f08a52b05 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/utils/HardLimitsImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/utils/HardLimitsImpl.kt @@ -7,8 +7,8 @@ import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.ui.UiInteraction import app.aaps.core.interfaces.utils.HardLimits -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertTherapyEventAnnouncementTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertTherapyEventAnnouncementTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/implementation/src/main/kotlin/app/aaps/implementation/utils/TrendCalculatorImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/utils/TrendCalculatorImpl.kt index 25e652b30b..c96b2d1e53 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/utils/TrendCalculatorImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/utils/TrendCalculatorImpl.kt @@ -6,7 +6,7 @@ import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.utils.T import app.aaps.core.interfaces.utils.TrendCalculator import app.aaps.database.entities.GlucoseValue -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import javax.inject.Inject import javax.inject.Singleton diff --git a/implementation/src/test/kotlin/app/aaps/implementation/overview/OverviewDataImplTest.kt b/implementation/src/test/kotlin/app/aaps/implementation/overview/OverviewDataImplTest.kt index dc36c27bd9..58064240e3 100644 --- a/implementation/src/test/kotlin/app/aaps/implementation/overview/OverviewDataImplTest.kt +++ b/implementation/src/test/kotlin/app/aaps/implementation/overview/OverviewDataImplTest.kt @@ -7,9 +7,9 @@ import app.aaps.core.interfaces.profile.DefaultValueHelper import app.aaps.core.interfaces.utils.T import app.aaps.database.ValueWrapper import app.aaps.database.entities.GlucoseValue +import app.aaps.database.impl.AppRepository import app.aaps.shared.tests.TestBaseWithProfile import com.google.common.truth.Truth.assertThat -import info.nightscout.database.impl.AppRepository import io.reactivex.rxjava3.core.Single import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test diff --git a/implementation/src/test/kotlin/app/aaps/implementation/queue/CommandQueueImplementationTest.kt b/implementation/src/test/kotlin/app/aaps/implementation/queue/CommandQueueImplementationTest.kt index 0b5393f98c..5631692f77 100644 --- a/implementation/src/test/kotlin/app/aaps/implementation/queue/CommandQueueImplementationTest.kt +++ b/implementation/src/test/kotlin/app/aaps/implementation/queue/CommandQueueImplementationTest.kt @@ -27,6 +27,7 @@ import app.aaps.core.main.constraints.ConstraintObject import app.aaps.core.main.utils.fabric.FabricPrivacy import app.aaps.database.ValueWrapper import app.aaps.database.entities.Bolus +import app.aaps.database.impl.AppRepository import app.aaps.implementation.queue.commands.CommandBolus import app.aaps.implementation.queue.commands.CommandCustomCommand import app.aaps.implementation.queue.commands.CommandExtendedBolus @@ -37,7 +38,6 @@ import app.aaps.shared.tests.TestPumpPlugin import com.google.common.truth.Truth.assertThat import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import io.reactivex.rxjava3.core.Single import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test diff --git a/implementation/src/test/kotlin/app/aaps/implementation/queue/QueueThreadTest.kt b/implementation/src/test/kotlin/app/aaps/implementation/queue/QueueThreadTest.kt index 7b3ba7b307..bb31b4629e 100644 --- a/implementation/src/test/kotlin/app/aaps/implementation/queue/QueueThreadTest.kt +++ b/implementation/src/test/kotlin/app/aaps/implementation/queue/QueueThreadTest.kt @@ -10,13 +10,13 @@ import app.aaps.core.interfaces.pump.defs.PumpDescription import app.aaps.core.interfaces.queue.Command import app.aaps.core.interfaces.ui.UiInteraction import app.aaps.core.main.constraints.ConstraintObject +import app.aaps.database.impl.AppRepository import app.aaps.implementation.queue.commands.CommandTempBasalAbsolute import app.aaps.shared.tests.TestBaseWithProfile import app.aaps.shared.tests.TestPumpPlugin import com.google.common.truth.Truth.assertThat import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.mockito.ArgumentMatchers diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/autotune/AutotuneIob.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/autotune/AutotuneIob.kt index 55157a1337..7e9577dad6 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/autotune/AutotuneIob.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/autotune/AutotuneIob.kt @@ -24,9 +24,9 @@ import app.aaps.database.entities.GlucoseValue import app.aaps.database.entities.TemporaryBasal import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.embedments.InterfaceIDs +import app.aaps.database.impl.AppRepository import app.aaps.plugins.aps.autotune.data.ATProfile import app.aaps.plugins.aps.autotune.data.LocalInsulin -import info.nightscout.database.impl.AppRepository import org.json.JSONArray import org.json.JSONObject import javax.inject.Inject diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/loop/LoopPlugin.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/loop/LoopPlugin.kt index fa3a71d63c..f5b58f927b 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/loop/LoopPlugin.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/loop/LoopPlugin.kt @@ -69,13 +69,13 @@ import app.aaps.database.entities.OfflineEvent import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertAndCancelCurrentOfflineEventTransaction +import app.aaps.database.impl.transactions.InsertTherapyEventAnnouncementTransaction import app.aaps.plugins.aps.R import app.aaps.plugins.aps.loop.events.EventLoopSetLastRunGui import app.aaps.plugins.aps.loop.extensions.json import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentOfflineEventTransaction -import info.nightscout.database.impl.transactions.InsertTherapyEventAnnouncementTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import org.json.JSONObject diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt index 623e3d6dbc..e684082ea3 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt @@ -30,13 +30,13 @@ import app.aaps.core.main.extensions.target import app.aaps.core.main.utils.fabric.FabricPrivacy import app.aaps.core.utils.MidnightUtils import app.aaps.database.ValueWrapper +import app.aaps.database.impl.AppRepository import app.aaps.plugins.aps.OpenAPSFragment import app.aaps.plugins.aps.R import app.aaps.plugins.aps.events.EventOpenAPSUpdateGui import app.aaps.plugins.aps.events.EventResetOpenAPSGui import app.aaps.plugins.aps.utils.ScriptReader import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import org.json.JSONException import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt index 77ada1d8b8..36c52fdde5 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt @@ -33,13 +33,13 @@ import app.aaps.core.main.constraints.ConstraintObject import app.aaps.core.main.extensions.target import app.aaps.core.utils.MidnightUtils import app.aaps.database.ValueWrapper +import app.aaps.database.impl.AppRepository import app.aaps.plugins.aps.OpenAPSFragment import app.aaps.plugins.aps.R import app.aaps.plugins.aps.events.EventOpenAPSUpdateGui import app.aaps.plugins.aps.events.EventResetOpenAPSGui import app.aaps.plugins.aps.utils.ScriptReader import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import javax.inject.Inject import javax.inject.Singleton import kotlin.math.floor diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt index b9a311b223..c8f3dc1d64 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt @@ -18,12 +18,12 @@ import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.stats.TddCalculator import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.HardLimits +import app.aaps.database.impl.AppRepository import app.aaps.plugins.aps.R import app.aaps.plugins.aps.openAPSSMB.DetermineBasalAdapterSMBJS import app.aaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin import app.aaps.plugins.aps.utils.ScriptReader import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/aps/src/test/kotlin/app/aaps/plugins/aps/autotune/AutotunePrepTest.kt b/plugins/aps/src/test/kotlin/app/aaps/plugins/aps/autotune/AutotunePrepTest.kt index ff7ff36d35..4049a991ed 100644 --- a/plugins/aps/src/test/kotlin/app/aaps/plugins/aps/autotune/AutotunePrepTest.kt +++ b/plugins/aps/src/test/kotlin/app/aaps/plugins/aps/autotune/AutotunePrepTest.kt @@ -16,12 +16,12 @@ import app.aaps.database.entities.Carbs import app.aaps.database.entities.GlucoseValue import app.aaps.database.entities.data.Block import app.aaps.database.entities.data.TargetBlock +import app.aaps.database.impl.AppRepository import app.aaps.plugins.aps.autotune.data.ATProfile import app.aaps.plugins.aps.autotune.data.LocalInsulin import app.aaps.plugins.aps.autotune.data.PreppedGlucose import app.aaps.shared.tests.TestBaseWithProfile import com.google.common.truth.Truth.assertThat -import info.nightscout.database.impl.AppRepository import org.json.JSONArray import org.json.JSONObject import org.junit.jupiter.api.BeforeEach diff --git a/plugins/aps/src/test/kotlin/app/aaps/plugins/aps/loop/LoopPluginTest.kt b/plugins/aps/src/test/kotlin/app/aaps/plugins/aps/loop/LoopPluginTest.kt index 7fb4577c31..7f1a0c0b10 100644 --- a/plugins/aps/src/test/kotlin/app/aaps/plugins/aps/loop/LoopPluginTest.kt +++ b/plugins/aps/src/test/kotlin/app/aaps/plugins/aps/loop/LoopPluginTest.kt @@ -19,11 +19,11 @@ import app.aaps.core.interfaces.ui.UiInteraction import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.main.utils.fabric.FabricPrivacy import app.aaps.core.nssdk.interfaces.RunningConfiguration +import app.aaps.database.impl.AppRepository import app.aaps.shared.tests.TestBase import com.google.common.truth.Truth.assertThat import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import info.nightscout.pump.virtual.VirtualPumpPlugin import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionCarePortalEvent.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionCarePortalEvent.kt index 2646698039..11cce53f17 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionCarePortalEvent.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionCarePortalEvent.kt @@ -15,14 +15,14 @@ import app.aaps.core.utils.JsonHelper import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction import app.aaps.plugins.automation.elements.InputCarePortalMenu import app.aaps.plugins.automation.elements.InputDuration import app.aaps.plugins.automation.elements.InputString import app.aaps.plugins.automation.elements.LabelWithElement import app.aaps.plugins.automation.elements.LayoutBuilder import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import org.json.JSONObject diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionLoopResume.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionLoopResume.kt index 2b29ee420d..07f8483d93 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionLoopResume.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionLoopResume.kt @@ -12,10 +12,10 @@ import app.aaps.core.interfaces.rx.events.EventRefreshOverview import app.aaps.core.interfaces.utils.DateUtil import app.aaps.database.entities.UserEntry import app.aaps.database.entities.UserEntry.Sources +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction import app.aaps.plugins.automation.R import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionNotification.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionNotification.kt index 2490889b61..f62475cd49 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionNotification.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionNotification.kt @@ -9,13 +9,13 @@ import app.aaps.core.interfaces.rx.bus.RxBus import app.aaps.core.interfaces.rx.events.EventRefreshOverview import app.aaps.core.main.events.EventNewNotification import app.aaps.core.utils.JsonHelper +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertTherapyEventAnnouncementTransaction import app.aaps.plugins.automation.R import app.aaps.plugins.automation.elements.InputString import app.aaps.plugins.automation.elements.LabelWithElement import app.aaps.plugins.automation.elements.LayoutBuilder import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertTherapyEventAnnouncementTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import org.json.JSONObject diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionStartTempTarget.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionStartTempTarget.kt index df351ea91c..90fe046898 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionStartTempTarget.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionStartTempTarget.kt @@ -19,6 +19,8 @@ import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.UserEntry import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction import app.aaps.plugins.automation.R import app.aaps.plugins.automation.elements.ComparatorExists import app.aaps.plugins.automation.elements.InputDuration @@ -27,8 +29,6 @@ import app.aaps.plugins.automation.elements.LabelWithElement import app.aaps.plugins.automation.elements.LayoutBuilder import app.aaps.plugins.automation.triggers.TriggerTempTarget import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import org.json.JSONObject diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionStopTempTarget.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionStopTempTarget.kt index 43f75fc768..e2a9d87705 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionStopTempTarget.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/actions/ActionStopTempTarget.kt @@ -7,10 +7,10 @@ import app.aaps.core.interfaces.queue.Callback import app.aaps.core.interfaces.utils.DateUtil import app.aaps.database.entities.UserEntry import app.aaps.database.entities.UserEntry.Sources +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CancelCurrentTemporaryTargetIfAnyTransaction import app.aaps.plugins.automation.R import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CancelCurrentTemporaryTargetIfAnyTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/Trigger.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/Trigger.kt index f2cd4a34cf..8fbcb97cf3 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/Trigger.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/Trigger.kt @@ -18,6 +18,7 @@ import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.rx.bus.RxBus import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.utils.DateUtil +import app.aaps.database.impl.AppRepository import app.aaps.plugins.automation.R import app.aaps.plugins.automation.dialogs.ChooseTriggerDialog import app.aaps.plugins.automation.events.EventTriggerChanged @@ -25,7 +26,6 @@ import app.aaps.plugins.automation.events.EventTriggerClone import app.aaps.plugins.automation.events.EventTriggerRemove import app.aaps.plugins.automation.services.LastLocationDataContainer import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import org.json.JSONObject import java.util.Optional import javax.inject.Inject diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionCarePortalEventTest.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionCarePortalEventTest.kt index f67974b1ee..a17c89966b 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionCarePortalEventTest.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionCarePortalEventTest.kt @@ -2,11 +2,11 @@ package app.aaps.plugins.automation.actions import app.aaps.core.interfaces.db.GlucoseUnit import app.aaps.core.interfaces.queue.Callback +import app.aaps.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction +import app.aaps.database.impl.transactions.Transaction import app.aaps.plugins.automation.elements.InputCarePortalMenu import app.aaps.plugins.automation.elements.InputDuration import app.aaps.plugins.automation.elements.InputString -import info.nightscout.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction -import info.nightscout.database.impl.transactions.Transaction import io.reactivex.rxjava3.core.Single import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionLoopResumeTest.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionLoopResumeTest.kt index 1fe6a2b572..c022e95fcc 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionLoopResumeTest.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionLoopResumeTest.kt @@ -2,9 +2,9 @@ package app.aaps.plugins.automation.actions import app.aaps.core.interfaces.queue.Callback import app.aaps.database.entities.TemporaryTarget +import app.aaps.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction +import app.aaps.database.impl.transactions.Transaction import app.aaps.plugins.automation.R -import info.nightscout.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction -import info.nightscout.database.impl.transactions.Transaction import io.reactivex.rxjava3.core.Single import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionNotificationTest.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionNotificationTest.kt index 348e43bfa8..79f6697abf 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionNotificationTest.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionNotificationTest.kt @@ -5,14 +5,14 @@ import app.aaps.core.interfaces.pump.PumpEnactResult import app.aaps.core.interfaces.queue.Callback import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.rx.bus.RxBus +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertTherapyEventAnnouncementTransaction +import app.aaps.database.impl.transactions.Transaction import app.aaps.plugins.automation.R import app.aaps.plugins.automation.elements.InputString import app.aaps.shared.tests.TestBase import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertTherapyEventAnnouncementTransaction -import info.nightscout.database.impl.transactions.Transaction import io.reactivex.rxjava3.core.Completable import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionStartTempTargetTest.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionStartTempTargetTest.kt index 2f60e5da6f..0acb80f798 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionStartTempTargetTest.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionStartTempTargetTest.kt @@ -3,11 +3,11 @@ package app.aaps.plugins.automation.actions import app.aaps.core.interfaces.db.GlucoseUnit import app.aaps.core.interfaces.queue.Callback import app.aaps.database.entities.TemporaryTarget +import app.aaps.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction +import app.aaps.database.impl.transactions.Transaction import app.aaps.plugins.automation.R import app.aaps.plugins.automation.elements.InputDuration import app.aaps.plugins.automation.elements.InputTempTarget -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction -import info.nightscout.database.impl.transactions.Transaction import io.reactivex.rxjava3.core.Single import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionStopTempTargetTest.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionStopTempTargetTest.kt index ef90c13fb1..6b9f69ada8 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionStopTempTargetTest.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionStopTempTargetTest.kt @@ -2,9 +2,9 @@ package app.aaps.plugins.automation.actions import app.aaps.core.interfaces.queue.Callback import app.aaps.database.entities.TemporaryTarget +import app.aaps.database.impl.transactions.CancelCurrentTemporaryTargetIfAnyTransaction +import app.aaps.database.impl.transactions.Transaction import app.aaps.plugins.automation.R -import info.nightscout.database.impl.transactions.CancelCurrentTemporaryTargetIfAnyTransaction -import info.nightscout.database.impl.transactions.Transaction import io.reactivex.rxjava3.core.Single import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionsTestBase.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionsTestBase.kt index 2c57fe6443..2898e855d3 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionsTestBase.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/actions/ActionsTestBase.kt @@ -17,11 +17,11 @@ import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.smsCommunicator.SmsCommunicator import app.aaps.core.main.constraints.ConstraintObject import app.aaps.database.entities.OfflineEvent +import app.aaps.database.impl.AppRepository import app.aaps.plugins.automation.triggers.Trigger import app.aaps.shared.tests.TestBaseWithProfile import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import org.junit.jupiter.api.BeforeEach import org.mockito.Mock import org.mockito.Mockito.`when` diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerTestBase.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerTestBase.kt index e39e176cfc..01276a5a0f 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerTestBase.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerTestBase.kt @@ -2,13 +2,13 @@ package app.aaps.plugins.automation.triggers import app.aaps.core.interfaces.aps.AutosensDataStore import app.aaps.core.interfaces.receivers.ReceiverStatusStore +import app.aaps.database.impl.AppRepository import app.aaps.implementation.iob.GlucoseStatusProviderImpl import app.aaps.plugins.automation.AutomationPlugin import app.aaps.plugins.automation.services.LastLocationDataContainer import app.aaps.shared.tests.TestBaseWithProfile import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import org.junit.jupiter.api.BeforeEach import org.mockito.Mock import org.mockito.Mockito.`when` diff --git a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt index 20a3b0aa64..f8fe180a12 100644 --- a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt +++ b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt @@ -17,6 +17,7 @@ import app.aaps.core.interfaces.pump.defs.PumpDescription import app.aaps.core.interfaces.queue.CommandQueue import app.aaps.core.interfaces.stats.TddCalculator import app.aaps.core.interfaces.ui.UiInteraction +import app.aaps.database.impl.AppRepository import app.aaps.implementation.iob.GlucoseStatusProviderImpl import app.aaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin import app.aaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin @@ -34,7 +35,6 @@ import info.nightscout.androidaps.insight.database.InsightDatabase import info.nightscout.androidaps.insight.database.InsightDatabaseDao import info.nightscout.androidaps.insight.database.InsightDbHelper import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin -import info.nightscout.database.impl.AppRepository import info.nightscout.pump.combo.ComboPlugin import info.nightscout.pump.combo.ruffyscripter.RuffyScripter import info.nightscout.pump.dana.DanaPump diff --git a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/safety/SafetyPluginTest.kt b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/safety/SafetyPluginTest.kt index a854ecca1e..d860f48f3d 100644 --- a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/safety/SafetyPluginTest.kt +++ b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/safety/SafetyPluginTest.kt @@ -12,6 +12,7 @@ import app.aaps.core.interfaces.stats.TddCalculator import app.aaps.core.interfaces.ui.UiInteraction import app.aaps.core.interfaces.utils.HardLimits import app.aaps.core.main.constraints.ConstraintObject +import app.aaps.database.impl.AppRepository import app.aaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin import app.aaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin import app.aaps.plugins.source.GlimpPlugin @@ -19,7 +20,6 @@ import app.aaps.shared.tests.TestBaseWithProfile import com.google.common.truth.Truth.assertThat import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import info.nightscout.pump.virtual.VirtualPumpPlugin import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt index b80dcd1404..33be2cc5a2 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt @@ -49,10 +49,10 @@ import app.aaps.database.entities.Bolus import app.aaps.database.entities.ExtendedBolus import app.aaps.database.entities.TemporaryBasal import app.aaps.database.entities.interfaces.end +import app.aaps.database.impl.AppRepository import app.aaps.plugins.iob.iobCobCalculator.data.AutosensDataStoreObject import app.aaps.plugins.main.R import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import org.json.JSONArray diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/actions/ActionsFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/actions/ActionsFragment.kt index 68261d0151..78771f25cc 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/actions/ActionsFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/actions/ActionsFragment.kt @@ -40,12 +40,12 @@ import app.aaps.core.ui.elements.SingleClickButton import app.aaps.database.ValueWrapper import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources +import app.aaps.database.impl.AppRepository import app.aaps.plugins.main.R import app.aaps.plugins.main.databinding.ActionsFragmentBinding import app.aaps.plugins.main.general.overview.ui.StatusLightHandler import app.aaps.plugins.main.skins.SkinProvider import dagger.android.support.DaggerFragment -import info.nightscout.database.impl.AppRepository import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/food/FoodFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/food/FoodFragment.kt index 69eb4d98ef..d8261edb91 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/food/FoodFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/food/FoodFragment.kt @@ -27,12 +27,12 @@ import app.aaps.core.ui.dialogs.OKDialog import app.aaps.database.entities.Food import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InvalidateFoodTransaction import app.aaps.plugins.main.R import app.aaps.plugins.main.databinding.FoodFragmentBinding import app.aaps.plugins.main.databinding.FoodItemBinding import dagger.android.support.DaggerFragment -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InvalidateFoodTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.Locale diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index c8028f7d70..16bd440723 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -91,6 +91,7 @@ import app.aaps.core.utils.JsonHelper import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.interfaces.end +import app.aaps.database.impl.AppRepository import app.aaps.plugins.main.R import app.aaps.plugins.main.databinding.OverviewFragmentBinding import app.aaps.plugins.main.general.overview.graphData.GraphData @@ -101,7 +102,6 @@ import app.aaps.plugins.main.skins.SkinProvider import com.jjoe64.graphview.GraphView import dagger.android.HasAndroidInjector import dagger.android.support.DaggerFragment -import info.nightscout.database.impl.AppRepository import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.Locale diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/ui/StatusLightHandler.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/ui/StatusLightHandler.kt index 339e13c4f4..c57b5c49e5 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/ui/StatusLightHandler.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/ui/StatusLightHandler.kt @@ -17,8 +17,8 @@ import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.DecimalFormatter import app.aaps.database.ValueWrapper import app.aaps.database.entities.TherapyEvent +import app.aaps.database.impl.AppRepository import app.aaps.plugins.main.R -import info.nightscout.database.impl.AppRepository import java.util.concurrent.TimeUnit import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/smsCommunicator/SmsCommunicatorPlugin.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/smsCommunicator/SmsCommunicatorPlugin.kt index 8a58848d20..a8a10c0410 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/smsCommunicator/SmsCommunicatorPlugin.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/smsCommunicator/SmsCommunicatorPlugin.kt @@ -59,15 +59,15 @@ import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction +import app.aaps.database.impl.transactions.CancelCurrentTemporaryTargetIfAnyTransaction +import app.aaps.database.impl.transactions.InsertAndCancelCurrentOfflineEventTransaction +import app.aaps.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction import app.aaps.plugins.main.R import app.aaps.plugins.main.general.smsCommunicator.events.EventSmsCommunicatorUpdateGui import app.aaps.plugins.main.general.smsCommunicator.otp.OneTimePassword import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction -import info.nightscout.database.impl.transactions.CancelCurrentTemporaryTargetIfAnyTransaction -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentOfflineEventTransaction -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import kotlinx.coroutines.Dispatchers diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/wear/wearintegration/DataHandlerMobile.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/wear/wearintegration/DataHandlerMobile.kt index 6e2c272c41..d05105cd10 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/wear/wearintegration/DataHandlerMobile.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/wear/wearintegration/DataHandlerMobile.kt @@ -62,12 +62,12 @@ import app.aaps.database.entities.TotalDailyDose import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit import app.aaps.database.entities.interfaces.end +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CancelCurrentTemporaryTargetIfAnyTransaction +import app.aaps.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction +import app.aaps.database.impl.transactions.InsertOrUpdateHeartRateTransaction import app.aaps.plugins.main.R import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CancelCurrentTemporaryTargetIfAnyTransaction -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction -import info.nightscout.database.impl.transactions.InsertOrUpdateHeartRateTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DateFormat diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/wear/wearintegration/DataLayerListenerServiceMobile.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/wear/wearintegration/DataLayerListenerServiceMobile.kt index 6dcbe19718..5f89f9ef09 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/wear/wearintegration/DataLayerListenerServiceMobile.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/wear/wearintegration/DataLayerListenerServiceMobile.kt @@ -19,6 +19,7 @@ import app.aaps.core.interfaces.rx.events.EventWearUpdateGui import app.aaps.core.interfaces.rx.weardata.EventData import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.main.utils.fabric.FabricPrivacy +import app.aaps.database.impl.AppRepository import app.aaps.plugins.main.R import app.aaps.plugins.main.general.wear.WearPlugin import com.google.android.gms.tasks.Tasks @@ -33,7 +34,6 @@ import com.google.android.gms.wearable.PutDataMapRequest import com.google.android.gms.wearable.Wearable import com.google.android.gms.wearable.WearableListenerService import dagger.android.AndroidInjection -import info.nightscout.database.impl.AppRepository import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import kotlinx.coroutines.CancellationException diff --git a/plugins/main/src/test/kotlin/app/aaps/plugins/main/general/smsCommunicator/SmsCommunicatorPluginTest.kt b/plugins/main/src/test/kotlin/app/aaps/plugins/main/general/smsCommunicator/SmsCommunicatorPluginTest.kt index 038098b587..5ba9a2e1bd 100644 --- a/plugins/main/src/test/kotlin/app/aaps/plugins/main/general/smsCommunicator/SmsCommunicatorPluginTest.kt +++ b/plugins/main/src/test/kotlin/app/aaps/plugins/main/general/smsCommunicator/SmsCommunicatorPluginTest.kt @@ -21,6 +21,11 @@ import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.T import app.aaps.core.main.constraints.ConstraintObject import app.aaps.database.entities.GlucoseValue +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction +import app.aaps.database.impl.transactions.InsertAndCancelCurrentOfflineEventTransaction +import app.aaps.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction +import app.aaps.database.impl.transactions.Transaction import app.aaps.implementation.iob.GlucoseStatusProviderImpl import app.aaps.plugins.main.R import app.aaps.plugins.main.general.smsCommunicator.otp.OneTimePassword @@ -29,11 +34,6 @@ import app.aaps.shared.tests.TestBaseWithProfile import com.google.common.truth.Truth.assertThat import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentOfflineEventTransaction -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction -import info.nightscout.database.impl.transactions.Transaction import io.reactivex.rxjava3.core.Single import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test diff --git a/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityAAPSPlugin.kt b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityAAPSPlugin.kt index c7d5da2692..e77ba5cd2c 100644 --- a/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityAAPSPlugin.kt +++ b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityAAPSPlugin.kt @@ -16,10 +16,10 @@ import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.utils.MidnightUtils import app.aaps.core.utils.Percentile import app.aaps.database.entities.TherapyEvent +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sensitivity.extensions.isPSEvent5minBack import app.aaps.plugins.sensitivity.extensions.isTherapyEventEvent5minBack import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import org.json.JSONException import org.json.JSONObject import java.util.Arrays diff --git a/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityOref1Plugin.kt b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityOref1Plugin.kt index 7b4887808d..51a90debd2 100644 --- a/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityOref1Plugin.kt +++ b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityOref1Plugin.kt @@ -19,10 +19,10 @@ import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.utils.MidnightUtils import app.aaps.core.utils.Percentile import app.aaps.database.entities.TherapyEvent +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sensitivity.extensions.isPSEvent5minBack import app.aaps.plugins.sensitivity.extensions.isTherapyEventEvent5minBack import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import org.json.JSONException import org.json.JSONObject import java.util.Arrays diff --git a/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt index c048c1c2fa..b068503e81 100644 --- a/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt +++ b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt @@ -16,10 +16,10 @@ import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.utils.MidnightUtils import app.aaps.database.entities.TherapyEvent +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sensitivity.extensions.isPSEvent5minBack import app.aaps.plugins.sensitivity.extensions.isTherapyEventEvent5minBack import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import org.json.JSONException import org.json.JSONObject import javax.inject.Inject diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/AidexPlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/AidexPlugin.kt index 1c55e07707..93c3975a6e 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/AidexPlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/AidexPlugin.kt @@ -16,10 +16,10 @@ import app.aaps.core.interfaces.source.BgSource import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.utils.receivers.DataWorkerStorage import app.aaps.database.entities.GlucoseValue +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CgmSourceTransaction import app.aaps.database.transactions.TransactionGlucoseValue import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CgmSourceTransaction import kotlinx.coroutines.Dispatchers import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/BGSourceFragment.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/BGSourceFragment.kt index 6cc6236a26..fb5e4f67cb 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/BGSourceFragment.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/BGSourceFragment.kt @@ -36,11 +36,11 @@ import app.aaps.database.entities.GlucoseValue import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InvalidateGlucoseValueTransaction import app.aaps.plugins.source.databinding.SourceFragmentBinding import app.aaps.plugins.source.databinding.SourceItemBinding import dagger.android.support.DaggerFragment -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InvalidateGlucoseValueTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.concurrent.TimeUnit diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/DexcomPlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/DexcomPlugin.kt index c3f92e4cc9..54ab844340 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/DexcomPlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/DexcomPlugin.kt @@ -28,13 +28,13 @@ import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CgmSourceTransaction +import app.aaps.database.impl.transactions.InvalidateGlucoseValueTransaction import app.aaps.database.transactions.TransactionGlucoseValue import app.aaps.plugins.source.activities.RequestDexcomPermissionActivity import app.aaps.shared.impl.extensions.safeGetInstalledPackages import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CgmSourceTransaction -import info.nightscout.database.impl.transactions.InvalidateGlucoseValueTransaction import kotlinx.coroutines.Dispatchers import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/EversensePlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/EversensePlugin.kt index 6a94fae92a..518ebd73de 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/EversensePlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/EversensePlugin.kt @@ -15,11 +15,11 @@ import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.utils.receivers.DataWorkerStorage import app.aaps.database.entities.GlucoseValue import app.aaps.database.entities.TherapyEvent +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CgmSourceTransaction +import app.aaps.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction import app.aaps.database.transactions.TransactionGlucoseValue import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CgmSourceTransaction -import info.nightscout.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction import kotlinx.coroutines.Dispatchers import java.util.Arrays import javax.inject.Inject diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/GlimpPlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/GlimpPlugin.kt index 31374b0029..428b3d9acc 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/GlimpPlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/GlimpPlugin.kt @@ -13,10 +13,10 @@ import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.source.BgSource import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.database.entities.GlucoseValue +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CgmSourceTransaction import app.aaps.database.transactions.TransactionGlucoseValue import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CgmSourceTransaction import kotlinx.coroutines.Dispatchers import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/GlunovoPlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/GlunovoPlugin.kt index 846facaf85..91e2863418 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/GlunovoPlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/GlunovoPlugin.kt @@ -21,10 +21,10 @@ import app.aaps.database.entities.GlucoseValue import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CgmSourceTransaction import app.aaps.database.transactions.TransactionGlucoseValue import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CgmSourceTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/IntelligoPlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/IntelligoPlugin.kt index 36b36582c5..a931ab3117 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/IntelligoPlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/IntelligoPlugin.kt @@ -23,11 +23,11 @@ import app.aaps.database.entities.GlucoseValue import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CgmSourceTransaction import app.aaps.database.transactions.TransactionGlucoseValue import app.aaps.shared.impl.extensions.safeGetInstalledPackages import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CgmSourceTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/MM640gPlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/MM640gPlugin.kt index 24d090a364..4fa2a59acc 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/MM640gPlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/MM640gPlugin.kt @@ -13,10 +13,10 @@ import app.aaps.core.interfaces.source.BgSource import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.database.entities.GlucoseValue +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CgmSourceTransaction import app.aaps.database.transactions.TransactionGlucoseValue import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CgmSourceTransaction import kotlinx.coroutines.Dispatchers import org.json.JSONArray import org.json.JSONException diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/PoctechPlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/PoctechPlugin.kt index 8d46aa5d98..39dcaa89c3 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/PoctechPlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/PoctechPlugin.kt @@ -15,10 +15,10 @@ import app.aaps.core.interfaces.source.BgSource import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.utils.JsonHelper.safeGetString import app.aaps.database.entities.GlucoseValue +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CgmSourceTransaction import app.aaps.database.transactions.TransactionGlucoseValue import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CgmSourceTransaction import kotlinx.coroutines.Dispatchers import org.json.JSONArray import org.json.JSONException diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/RandomBgPlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/RandomBgPlugin.kt index bf6bc0e3ac..f387887bda 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/RandomBgPlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/RandomBgPlugin.kt @@ -15,10 +15,10 @@ import app.aaps.core.interfaces.source.BgSource import app.aaps.core.interfaces.utils.T import app.aaps.core.utils.isRunningTest import app.aaps.database.entities.GlucoseValue +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CgmSourceTransaction import app.aaps.database.transactions.TransactionGlucoseValue import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CgmSourceTransaction import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.security.SecureRandom diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/TomatoPlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/TomatoPlugin.kt index 2f920b7ef1..a18f331fd3 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/TomatoPlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/TomatoPlugin.kt @@ -13,10 +13,10 @@ import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.source.BgSource import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.database.entities.GlucoseValue +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CgmSourceTransaction import app.aaps.database.transactions.TransactionGlucoseValue import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CgmSourceTransaction import kotlinx.coroutines.Dispatchers import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt index 7f15daaebe..f38272a0be 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt @@ -15,10 +15,10 @@ import app.aaps.core.interfaces.source.XDripSource import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.utils.receivers.DataWorkerStorage import app.aaps.database.entities.GlucoseValue +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CgmSourceTransaction import app.aaps.database.transactions.TransactionGlucoseValue import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CgmSourceTransaction import kotlinx.coroutines.Dispatchers import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/StoreDataForDbImpl.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/StoreDataForDbImpl.kt index 8b5310aff6..2cb0faafbc 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/StoreDataForDbImpl.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/StoreDataForDbImpl.kt @@ -30,45 +30,45 @@ import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CgmSourceTransaction +import app.aaps.database.impl.transactions.InvalidateBolusCalculatorResultTransaction +import app.aaps.database.impl.transactions.InvalidateBolusTransaction +import app.aaps.database.impl.transactions.InvalidateCarbsTransaction +import app.aaps.database.impl.transactions.InvalidateEffectiveProfileSwitchTransaction +import app.aaps.database.impl.transactions.InvalidateExtendedBolusTransaction +import app.aaps.database.impl.transactions.InvalidateGlucoseValueTransaction +import app.aaps.database.impl.transactions.InvalidateOfflineEventTransaction +import app.aaps.database.impl.transactions.InvalidateProfileSwitchTransaction +import app.aaps.database.impl.transactions.InvalidateTemporaryBasalTransaction +import app.aaps.database.impl.transactions.InvalidateTemporaryTargetTransaction +import app.aaps.database.impl.transactions.InvalidateTherapyEventTransaction +import app.aaps.database.impl.transactions.SyncNsBolusCalculatorResultTransaction +import app.aaps.database.impl.transactions.SyncNsBolusTransaction +import app.aaps.database.impl.transactions.SyncNsCarbsTransaction +import app.aaps.database.impl.transactions.SyncNsEffectiveProfileSwitchTransaction +import app.aaps.database.impl.transactions.SyncNsExtendedBolusTransaction +import app.aaps.database.impl.transactions.SyncNsFoodTransaction +import app.aaps.database.impl.transactions.SyncNsOfflineEventTransaction +import app.aaps.database.impl.transactions.SyncNsProfileSwitchTransaction +import app.aaps.database.impl.transactions.SyncNsTemporaryBasalTransaction +import app.aaps.database.impl.transactions.SyncNsTemporaryTargetTransaction +import app.aaps.database.impl.transactions.SyncNsTherapyEventTransaction +import app.aaps.database.impl.transactions.UpdateNsIdBolusCalculatorResultTransaction +import app.aaps.database.impl.transactions.UpdateNsIdBolusTransaction +import app.aaps.database.impl.transactions.UpdateNsIdCarbsTransaction +import app.aaps.database.impl.transactions.UpdateNsIdDeviceStatusTransaction +import app.aaps.database.impl.transactions.UpdateNsIdEffectiveProfileSwitchTransaction +import app.aaps.database.impl.transactions.UpdateNsIdExtendedBolusTransaction +import app.aaps.database.impl.transactions.UpdateNsIdFoodTransaction +import app.aaps.database.impl.transactions.UpdateNsIdGlucoseValueTransaction +import app.aaps.database.impl.transactions.UpdateNsIdOfflineEventTransaction +import app.aaps.database.impl.transactions.UpdateNsIdProfileSwitchTransaction +import app.aaps.database.impl.transactions.UpdateNsIdTemporaryBasalTransaction +import app.aaps.database.impl.transactions.UpdateNsIdTemporaryTargetTransaction +import app.aaps.database.impl.transactions.UpdateNsIdTherapyEventTransaction import app.aaps.database.transactions.TransactionGlucoseValue import app.aaps.plugins.sync.R -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CgmSourceTransaction -import info.nightscout.database.impl.transactions.InvalidateBolusCalculatorResultTransaction -import info.nightscout.database.impl.transactions.InvalidateBolusTransaction -import info.nightscout.database.impl.transactions.InvalidateCarbsTransaction -import info.nightscout.database.impl.transactions.InvalidateEffectiveProfileSwitchTransaction -import info.nightscout.database.impl.transactions.InvalidateExtendedBolusTransaction -import info.nightscout.database.impl.transactions.InvalidateGlucoseValueTransaction -import info.nightscout.database.impl.transactions.InvalidateOfflineEventTransaction -import info.nightscout.database.impl.transactions.InvalidateProfileSwitchTransaction -import info.nightscout.database.impl.transactions.InvalidateTemporaryBasalTransaction -import info.nightscout.database.impl.transactions.InvalidateTemporaryTargetTransaction -import info.nightscout.database.impl.transactions.InvalidateTherapyEventTransaction -import info.nightscout.database.impl.transactions.SyncNsBolusCalculatorResultTransaction -import info.nightscout.database.impl.transactions.SyncNsBolusTransaction -import info.nightscout.database.impl.transactions.SyncNsCarbsTransaction -import info.nightscout.database.impl.transactions.SyncNsEffectiveProfileSwitchTransaction -import info.nightscout.database.impl.transactions.SyncNsExtendedBolusTransaction -import info.nightscout.database.impl.transactions.SyncNsFoodTransaction -import info.nightscout.database.impl.transactions.SyncNsOfflineEventTransaction -import info.nightscout.database.impl.transactions.SyncNsProfileSwitchTransaction -import info.nightscout.database.impl.transactions.SyncNsTemporaryBasalTransaction -import info.nightscout.database.impl.transactions.SyncNsTemporaryTargetTransaction -import info.nightscout.database.impl.transactions.SyncNsTherapyEventTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdBolusCalculatorResultTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdBolusTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdCarbsTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdDeviceStatusTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdEffectiveProfileSwitchTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdExtendedBolusTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdFoodTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdGlucoseValueTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdOfflineEventTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdProfileSwitchTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdTemporaryBasalTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdTemporaryTargetTransaction -import info.nightscout.database.impl.transactions.UpdateNsIdTherapyEventTransaction import java.util.concurrent.Executors import java.util.concurrent.ScheduledFuture import java.util.concurrent.TimeUnit diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/DataSyncSelectorV1.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/DataSyncSelectorV1.kt index b2d3149377..2107b405ff 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/DataSyncSelectorV1.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/DataSyncSelectorV1.kt @@ -12,10 +12,10 @@ import app.aaps.core.interfaces.sync.DataSyncSelector import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.utils.JsonHelper import app.aaps.core.utils.waitMillis +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sync.R import app.aaps.plugins.sync.nsShared.events.EventNSClientUpdateGuiQueue import app.aaps.plugins.sync.nsShared.events.EventNSClientUpdateGuiStatus -import info.nightscout.database.impl.AppRepository import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/services/NSClientService.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/services/NSClientService.kt index cf2544729e..436945ce33 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/services/NSClientService.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/services/NSClientService.kt @@ -30,6 +30,7 @@ import app.aaps.core.nssdk.localmodel.devicestatus.NSDeviceStatus import app.aaps.core.utils.JsonHelper.safeGetString import app.aaps.core.utils.JsonHelper.safeGetStringAllowNull import app.aaps.core.utils.receivers.DataWorkerStorage +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sync.R import app.aaps.plugins.sync.nsShared.NSAlarmObject import app.aaps.plugins.sync.nsShared.NsIncomingDataProcessor @@ -51,7 +52,6 @@ import com.google.gson.GsonBuilder import com.google.gson.JsonDeserializer import dagger.android.DaggerService import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import io.socket.client.IO diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/workers/NSClientAddAckWorker.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/workers/NSClientAddAckWorker.kt index 14507b5a96..ad362862ff 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/workers/NSClientAddAckWorker.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/workers/NSClientAddAckWorker.kt @@ -26,9 +26,9 @@ import app.aaps.core.interfaces.sync.DataSyncSelector.PairTherapyEvent import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.utils.notifyAll import app.aaps.core.utils.receivers.DataWorkerStorage +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sync.R import app.aaps.plugins.sync.nsclient.acks.NSAddAck -import info.nightscout.database.impl.AppRepository import kotlinx.coroutines.Dispatchers import javax.inject.Inject diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/workers/NSClientAddUpdateWorker.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/workers/NSClientAddUpdateWorker.kt index 7a98561226..8fa3806411 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/workers/NSClientAddUpdateWorker.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/workers/NSClientAddUpdateWorker.kt @@ -25,12 +25,12 @@ import app.aaps.database.entities.ProfileSwitch import app.aaps.database.entities.TemporaryBasal import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.TherapyEvent +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sync.R import app.aaps.plugins.sync.nsclient.extensions.extendedBolusFromJson import app.aaps.plugins.sync.nsclient.extensions.fromJson import app.aaps.plugins.sync.nsclient.extensions.isEffectiveProfileSwitch import app.aaps.plugins.sync.nsclient.extensions.temporaryBasalFromJson -import info.nightscout.database.impl.AppRepository import kotlinx.coroutines.Dispatchers import javax.inject.Inject diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/workers/NSClientUpdateRemoveAckWorker.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/workers/NSClientUpdateRemoveAckWorker.kt index 2fd41ad41b..6f4e3f451b 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/workers/NSClientUpdateRemoveAckWorker.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/workers/NSClientUpdateRemoveAckWorker.kt @@ -21,8 +21,8 @@ import app.aaps.core.interfaces.sync.DataSyncSelector.PairTherapyEvent import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.utils.notifyAll import app.aaps.core.utils.receivers.DataWorkerStorage +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sync.nsclient.acks.NSUpdateAck -import info.nightscout.database.impl.AppRepository import kotlinx.coroutines.Dispatchers import javax.inject.Inject diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/DataSyncSelectorV3.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/DataSyncSelectorV3.kt index b99691b545..4a6cd8e599 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/DataSyncSelectorV3.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/DataSyncSelectorV3.kt @@ -13,10 +13,10 @@ import app.aaps.core.interfaces.source.NSClientSource import app.aaps.core.interfaces.sync.DataSyncSelector import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.utils.JsonHelper +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sync.R import app.aaps.plugins.sync.nsShared.events.EventNSClientUpdateGuiQueue import app.aaps.plugins.sync.nsShared.events.EventNSClientUpdateGuiStatus -import info.nightscout.database.impl.AppRepository import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt index 29629c0ed5..970857c0be 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt @@ -57,6 +57,7 @@ import app.aaps.core.nssdk.mapper.toNSTreatment import app.aaps.core.nssdk.remotemodel.LastModified import app.aaps.database.ValueWrapper import app.aaps.database.entities.interfaces.TraceableDBEntry +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sync.R import app.aaps.plugins.sync.nsShared.NSAlarmObject import app.aaps.plugins.sync.nsShared.NSClientFragment @@ -90,7 +91,6 @@ import app.aaps.plugins.sync.nsclientV3.workers.LoadTreatmentsWorker import com.google.gson.Gson import com.google.gson.GsonBuilder import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import io.socket.client.Ack diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/openhumans/OpenHumansUploaderPlugin.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/openhumans/OpenHumansUploaderPlugin.kt index 5974216c88..2e39e1a5f0 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/openhumans/OpenHumansUploaderPlugin.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/openhumans/OpenHumansUploaderPlugin.kt @@ -29,6 +29,7 @@ import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.sync.Sync import app.aaps.database.entities.data.Block import app.aaps.database.entities.interfaces.TraceableDBEntry +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sync.R import app.aaps.plugins.sync.openhumans.delegates.OHAppIDDelegate import app.aaps.plugins.sync.openhumans.delegates.OHCounterDelegate @@ -36,7 +37,6 @@ import app.aaps.plugins.sync.openhumans.delegates.OHStateDelegate import app.aaps.plugins.sync.openhumans.ui.OHFragment import app.aaps.plugins.sync.openhumans.ui.OHLoginActivity import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import kotlinx.coroutines.Dispatchers diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/tidepool/comm/UploadChunk.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/tidepool/comm/UploadChunk.kt index 065a53f192..2edfae41a2 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/tidepool/comm/UploadChunk.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/tidepool/comm/UploadChunk.kt @@ -11,6 +11,7 @@ import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.T import app.aaps.database.entities.EffectiveProfileSwitch import app.aaps.database.entities.TemporaryBasal +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sync.R import app.aaps.plugins.sync.tidepool.elements.BasalElement import app.aaps.plugins.sync.tidepool.elements.BaseElement @@ -21,7 +22,6 @@ import app.aaps.plugins.sync.tidepool.elements.SensorGlucoseElement import app.aaps.plugins.sync.tidepool.elements.WizardElement import app.aaps.plugins.sync.tidepool.events.EventTidepoolStatus import app.aaps.plugins.sync.tidepool.utils.GsonInstance -import info.nightscout.database.impl.AppRepository import java.util.LinkedList import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/xdrip/DataSyncSelectorXdripImpl.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/xdrip/DataSyncSelectorXdripImpl.kt index 460bc37e70..ecc0cd2a59 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/xdrip/DataSyncSelectorXdripImpl.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/xdrip/DataSyncSelectorXdripImpl.kt @@ -11,9 +11,9 @@ import app.aaps.core.interfaces.sync.XDripBroadcast import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.T import app.aaps.core.utils.JsonHelper +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sync.R import dagger.Lazy -import info.nightscout.database.impl.AppRepository import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3PluginTest.kt b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3PluginTest.kt index 610eee292a..5788c3b9aa 100644 --- a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3PluginTest.kt +++ b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3PluginTest.kt @@ -26,6 +26,7 @@ import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.embedments.InsulinConfiguration import app.aaps.database.entities.embedments.InterfaceIDs +import app.aaps.database.impl.AppRepository import app.aaps.plugins.sync.nsShared.NsIncomingDataProcessor import app.aaps.plugins.sync.nsShared.StoreDataForDbImpl import app.aaps.plugins.sync.nsclient.ReceiverDelegate @@ -35,7 +36,6 @@ import app.aaps.shared.tests.TestBaseWithProfile import com.google.common.truth.Truth.assertThat import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test diff --git a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorkerTest.kt b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorkerTest.kt index 75416ba81d..16bde12e49 100644 --- a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorkerTest.kt +++ b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorkerTest.kt @@ -21,6 +21,7 @@ import app.aaps.core.nssdk.remotemodel.LastModified import app.aaps.core.utils.receivers.DataWorkerStorage import app.aaps.database.entities.GlucoseValue import app.aaps.database.entities.embedments.InterfaceIDs +import app.aaps.database.impl.AppRepository import app.aaps.implementation.utils.DecimalFormatterImpl import app.aaps.plugins.sync.nsShared.NsIncomingDataProcessor import app.aaps.plugins.sync.nsclient.ReceiverDelegate @@ -32,7 +33,6 @@ import app.aaps.shared.tests.TestBase import com.google.common.truth.Truth.assertThat import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test diff --git a/pump/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicHistoryDataUTest.kt b/pump/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicHistoryDataUTest.kt index 3df24ebad4..70bcd924e4 100644 --- a/pump/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicHistoryDataUTest.kt +++ b/pump/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicHistoryDataUTest.kt @@ -2,6 +2,7 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm import android.util.Log import app.aaps.core.interfaces.ui.UiInteraction +import app.aaps.database.impl.serialisation.SealedClassHelper import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicTestBase import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RawHistoryPage import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder @@ -12,7 +13,6 @@ import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.TempBasalProce import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil -import info.nightscout.database.impl.serialisation.SealedClassHelper import info.nightscout.pump.common.utils.ByteUtil import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/ErrorHelperActivity.kt b/ui/src/main/kotlin/app/aaps/ui/activities/ErrorHelperActivity.kt index 0e64b71213..3df1c0651d 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/ErrorHelperActivity.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/ErrorHelperActivity.kt @@ -3,8 +3,8 @@ package app.aaps.ui.activities import android.os.Bundle import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.ui.activities.TranslatedDaggerAppCompatActivity -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertTherapyEventAnnouncementTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertTherapyEventAnnouncementTransaction import app.aaps.ui.alertDialogs.ErrorDialog import app.aaps.ui.services.AlarmSoundService import io.reactivex.rxjava3.disposables.CompositeDisposable diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/ProfileHelperActivity.kt b/ui/src/main/kotlin/app/aaps/ui/activities/ProfileHelperActivity.kt index 2e7915ab12..66562a4f58 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/ProfileHelperActivity.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/ProfileHelperActivity.kt @@ -24,14 +24,14 @@ import app.aaps.core.ui.activities.TranslatedDaggerAppCompatActivity import app.aaps.core.ui.dialogs.OKDialog import app.aaps.core.ui.toast.ToastUtils import app.aaps.database.entities.EffectiveProfileSwitch -import com.google.android.material.tabs.TabLayout -import com.google.common.collect.Lists -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import app.aaps.ui.R import app.aaps.ui.databinding.ActivityProfilehelperBinding import app.aaps.ui.defaultProfile.DefaultProfile import app.aaps.ui.defaultProfile.DefaultProfileDPV import app.aaps.ui.dialogs.ProfileViewerDialog +import com.google.android.material.tabs.TabLayout +import com.google.common.collect.Lists import io.reactivex.rxjava3.core.Single import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/StatsActivity.kt b/ui/src/main/kotlin/app/aaps/ui/activities/StatsActivity.kt index d13b904b33..13adcabdf1 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/StatsActivity.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/StatsActivity.kt @@ -16,7 +16,7 @@ import app.aaps.core.ui.activities.TranslatedDaggerAppCompatActivity import app.aaps.core.ui.dialogs.OKDialog import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import app.aaps.ui.R import app.aaps.ui.activityMonitor.ActivityMonitor import app.aaps.ui.databinding.ActivityStatsBinding diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/TDDStatsActivity.kt b/ui/src/main/kotlin/app/aaps/ui/activities/TDDStatsActivity.kt index 581164660d..73a1e28706 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/TDDStatsActivity.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/TDDStatsActivity.kt @@ -31,7 +31,7 @@ import app.aaps.core.interfaces.utils.T import app.aaps.core.main.utils.fabric.FabricPrivacy import app.aaps.core.ui.activities.TranslatedDaggerAppCompatActivity import app.aaps.database.entities.TotalDailyDose -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import app.aaps.ui.databinding.ActivityTddStatsBinding import io.reactivex.rxjava3.disposables.CompositeDisposable import java.text.DateFormat diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsBolusCarbsFragment.kt b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsBolusCarbsFragment.kt index fd7ed567bd..9f6c333ce2 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsBolusCarbsFragment.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsBolusCarbsFragment.kt @@ -40,18 +40,18 @@ import app.aaps.database.entities.Carbs import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit -import com.google.gson.Gson -import dagger.android.support.DaggerFragment -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CutCarbsTransaction -import info.nightscout.database.impl.transactions.InvalidateBolusCalculatorResultTransaction -import info.nightscout.database.impl.transactions.InvalidateBolusTransaction -import info.nightscout.database.impl.transactions.InvalidateCarbsTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CutCarbsTransaction +import app.aaps.database.impl.transactions.InvalidateBolusCalculatorResultTransaction +import app.aaps.database.impl.transactions.InvalidateBolusTransaction +import app.aaps.database.impl.transactions.InvalidateCarbsTransaction import app.aaps.ui.R import app.aaps.ui.databinding.TreatmentsBolusCarbsFragmentBinding import app.aaps.ui.databinding.TreatmentsBolusCarbsItemBinding import app.aaps.ui.dialogs.WizardInfoDialog import app.aaps.ui.extensions.isPumpHistory +import com.google.gson.Gson +import dagger.android.support.DaggerFragment import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.concurrent.TimeUnit diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsCareportalFragment.kt b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsCareportalFragment.kt index 5a6be8d5ae..fd6af63c65 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsCareportalFragment.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsCareportalFragment.kt @@ -34,14 +34,14 @@ import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit -import dagger.android.support.DaggerFragment -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InvalidateAAPSStartedTherapyEventTransaction -import info.nightscout.database.impl.transactions.InvalidateTherapyEventTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InvalidateAAPSStartedTherapyEventTransaction +import app.aaps.database.impl.transactions.InvalidateTherapyEventTransaction import app.aaps.ui.R import app.aaps.ui.activities.fragments.TreatmentsCareportalFragment.RecyclerViewAdapter.TherapyEventsViewHolder import app.aaps.ui.databinding.TreatmentsCareportalFragmentBinding import app.aaps.ui.databinding.TreatmentsCareportalItemBinding +import dagger.android.support.DaggerFragment import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.concurrent.TimeUnit diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsExtendedBolusesFragment.kt b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsExtendedBolusesFragment.kt index 5f4b9975ed..d57dcdbef0 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsExtendedBolusesFragment.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsExtendedBolusesFragment.kt @@ -37,13 +37,13 @@ import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit import app.aaps.database.entities.interfaces.end -import dagger.android.support.DaggerFragment -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InvalidateExtendedBolusTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InvalidateExtendedBolusTransaction import app.aaps.ui.R import app.aaps.ui.activities.fragments.TreatmentsExtendedBolusesFragment.RecyclerViewAdapter.ExtendedBolusesViewHolder import app.aaps.ui.databinding.TreatmentsExtendedbolusFragmentBinding import app.aaps.ui.databinding.TreatmentsExtendedbolusItemBinding +import dagger.android.support.DaggerFragment import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.concurrent.TimeUnit diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsProfileSwitchFragment.kt b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsProfileSwitchFragment.kt index 36d1bf62b7..1b11777da3 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsProfileSwitchFragment.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsProfileSwitchFragment.kt @@ -41,14 +41,14 @@ import app.aaps.core.ui.toast.ToastUtils import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit -import dagger.android.support.DaggerFragment -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InvalidateProfileSwitchTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InvalidateProfileSwitchTransaction import app.aaps.ui.R import app.aaps.ui.activities.fragments.TreatmentsProfileSwitchFragment.RecyclerProfileViewAdapter.ProfileSwitchViewHolder import app.aaps.ui.databinding.TreatmentsProfileswitchFragmentBinding import app.aaps.ui.databinding.TreatmentsProfileswitchItemBinding import app.aaps.ui.dialogs.ProfileViewerDialog +import dagger.android.support.DaggerFragment import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsTempTargetFragment.kt b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsTempTargetFragment.kt index e6f463c722..fc0d9c8bdd 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsTempTargetFragment.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsTempTargetFragment.kt @@ -42,13 +42,13 @@ import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit import app.aaps.database.entities.interfaces.end -import dagger.android.support.DaggerFragment -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InvalidateTemporaryTargetTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InvalidateTemporaryTargetTransaction import app.aaps.ui.R import app.aaps.ui.activities.fragments.TreatmentsTempTargetFragment.RecyclerViewAdapter.TempTargetsViewHolder import app.aaps.ui.databinding.TreatmentsTemptargetFragmentBinding import app.aaps.ui.databinding.TreatmentsTemptargetItemBinding +import dagger.android.support.DaggerFragment import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.concurrent.TimeUnit diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsTemporaryBasalsFragment.kt b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsTemporaryBasalsFragment.kt index 0d5d213f22..f272d0f930 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsTemporaryBasalsFragment.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsTemporaryBasalsFragment.kt @@ -42,14 +42,14 @@ import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit import app.aaps.database.entities.interfaces.end -import dagger.android.support.DaggerFragment -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InvalidateExtendedBolusTransaction -import info.nightscout.database.impl.transactions.InvalidateTemporaryBasalTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InvalidateExtendedBolusTransaction +import app.aaps.database.impl.transactions.InvalidateTemporaryBasalTransaction import app.aaps.ui.R import app.aaps.ui.activities.fragments.TreatmentsTemporaryBasalsFragment.RecyclerViewAdapter.TempBasalsViewHolder import app.aaps.ui.databinding.TreatmentsTempbasalsFragmentBinding import app.aaps.ui.databinding.TreatmentsTempbasalsItemBinding +import dagger.android.support.DaggerFragment import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.concurrent.TimeUnit diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsUserEntryFragment.kt b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsUserEntryFragment.kt index 7b798df036..1f0c929c97 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsUserEntryFragment.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsUserEntryFragment.kt @@ -28,11 +28,11 @@ import app.aaps.core.ui.toast.ToastUtils import app.aaps.database.entities.UserEntry import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources -import dagger.android.support.DaggerFragment -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import app.aaps.ui.R import app.aaps.ui.databinding.TreatmentsUserEntryFragmentBinding import app.aaps.ui.databinding.TreatmentsUserEntryItemBinding +import dagger.android.support.DaggerFragment import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/ui/src/main/kotlin/app/aaps/ui/dialogs/CarbsDialog.kt b/ui/src/main/kotlin/app/aaps/ui/dialogs/CarbsDialog.kt index 9461d8056e..b9edab17a8 100644 --- a/ui/src/main/kotlin/app/aaps/ui/dialogs/CarbsDialog.kt +++ b/ui/src/main/kotlin/app/aaps/ui/dialogs/CarbsDialog.kt @@ -37,12 +37,12 @@ import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.UserEntry.Action import app.aaps.database.entities.UserEntry.Sources import app.aaps.database.entities.ValueWithUnit -import com.google.common.base.Joiner -import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction import app.aaps.ui.R import app.aaps.ui.databinding.DialogCarbsBinding +import com.google.common.base.Joiner +import dagger.android.HasAndroidInjector import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DecimalFormat diff --git a/ui/src/main/kotlin/app/aaps/ui/dialogs/CareDialog.kt b/ui/src/main/kotlin/app/aaps/ui/dialogs/CareDialog.kt index 9ebd072483..779fc504dc 100644 --- a/ui/src/main/kotlin/app/aaps/ui/dialogs/CareDialog.kt +++ b/ui/src/main/kotlin/app/aaps/ui/dialogs/CareDialog.kt @@ -25,12 +25,12 @@ import app.aaps.core.utils.HtmlHelper import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit -import com.google.common.base.Joiner -import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction import app.aaps.ui.R import app.aaps.ui.databinding.DialogCareBinding +import com.google.common.base.Joiner +import dagger.android.HasAndroidInjector import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DecimalFormat diff --git a/ui/src/main/kotlin/app/aaps/ui/dialogs/FillDialog.kt b/ui/src/main/kotlin/app/aaps/ui/dialogs/FillDialog.kt index b17fa0fb56..0343c41265 100644 --- a/ui/src/main/kotlin/app/aaps/ui/dialogs/FillDialog.kt +++ b/ui/src/main/kotlin/app/aaps/ui/dialogs/FillDialog.kt @@ -25,12 +25,12 @@ import app.aaps.core.utils.HtmlHelper import app.aaps.database.entities.TherapyEvent import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit -import com.google.common.base.Joiner -import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertIfNewByTimestampTherapyEventTransaction import app.aaps.ui.R import app.aaps.ui.databinding.DialogFillBinding +import com.google.common.base.Joiner +import dagger.android.HasAndroidInjector import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.LinkedList diff --git a/ui/src/main/kotlin/app/aaps/ui/dialogs/InsulinDialog.kt b/ui/src/main/kotlin/app/aaps/ui/dialogs/InsulinDialog.kt index c8204825d3..d3c85b3c31 100644 --- a/ui/src/main/kotlin/app/aaps/ui/dialogs/InsulinDialog.kt +++ b/ui/src/main/kotlin/app/aaps/ui/dialogs/InsulinDialog.kt @@ -39,13 +39,13 @@ import app.aaps.core.utils.HtmlHelper import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit -import com.google.common.base.Joiner -import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction import app.aaps.ui.R import app.aaps.ui.databinding.DialogInsulinBinding import app.aaps.ui.extensions.toSignedString +import com.google.common.base.Joiner +import dagger.android.HasAndroidInjector import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DecimalFormat diff --git a/ui/src/main/kotlin/app/aaps/ui/dialogs/LoopDialog.kt b/ui/src/main/kotlin/app/aaps/ui/dialogs/LoopDialog.kt index aa5a717e1f..bd995baf15 100644 --- a/ui/src/main/kotlin/app/aaps/ui/dialogs/LoopDialog.kt +++ b/ui/src/main/kotlin/app/aaps/ui/dialogs/LoopDialog.kt @@ -43,13 +43,13 @@ import app.aaps.core.ui.toast.ToastUtils import app.aaps.database.entities.OfflineEvent import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit -import dagger.android.HasAndroidInjector -import dagger.android.support.DaggerDialogFragment -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentOfflineEventTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction +import app.aaps.database.impl.transactions.InsertAndCancelCurrentOfflineEventTransaction import app.aaps.ui.R import app.aaps.ui.databinding.DialogLoopBinding +import dagger.android.HasAndroidInjector +import dagger.android.support.DaggerDialogFragment import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/ui/src/main/kotlin/app/aaps/ui/dialogs/ProfileSwitchDialog.kt b/ui/src/main/kotlin/app/aaps/ui/dialogs/ProfileSwitchDialog.kt index b3b25ab920..fcbe571341 100644 --- a/ui/src/main/kotlin/app/aaps/ui/dialogs/ProfileSwitchDialog.kt +++ b/ui/src/main/kotlin/app/aaps/ui/dialogs/ProfileSwitchDialog.kt @@ -29,11 +29,11 @@ import app.aaps.core.utils.HtmlHelper import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit -import com.google.common.base.Joiner -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction import app.aaps.ui.R import app.aaps.ui.databinding.DialogProfileswitchBinding +import com.google.common.base.Joiner import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DecimalFormat diff --git a/ui/src/main/kotlin/app/aaps/ui/dialogs/ProfileViewerDialog.kt b/ui/src/main/kotlin/app/aaps/ui/dialogs/ProfileViewerDialog.kt index 013714dd1d..19807f8571 100644 --- a/ui/src/main/kotlin/app/aaps/ui/dialogs/ProfileViewerDialog.kt +++ b/ui/src/main/kotlin/app/aaps/ui/dialogs/ProfileViewerDialog.kt @@ -25,10 +25,10 @@ import app.aaps.core.main.extensions.pureProfileFromJson import app.aaps.core.main.profile.ProfileSealed import app.aaps.core.utils.HtmlHelper import app.aaps.database.ValueWrapper +import app.aaps.database.impl.AppRepository +import app.aaps.ui.databinding.DialogProfileviewerBinding import dagger.android.HasAndroidInjector import dagger.android.support.DaggerDialogFragment -import info.nightscout.database.impl.AppRepository -import app.aaps.ui.databinding.DialogProfileviewerBinding import org.json.JSONObject import java.text.DecimalFormat import javax.inject.Inject diff --git a/ui/src/main/kotlin/app/aaps/ui/dialogs/TempTargetDialog.kt b/ui/src/main/kotlin/app/aaps/ui/dialogs/TempTargetDialog.kt index 5cab4b5cf8..91dd6dea87 100644 --- a/ui/src/main/kotlin/app/aaps/ui/dialogs/TempTargetDialog.kt +++ b/ui/src/main/kotlin/app/aaps/ui/dialogs/TempTargetDialog.kt @@ -23,13 +23,13 @@ import app.aaps.database.ValueWrapper import app.aaps.database.entities.TemporaryTarget import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit -import com.google.common.base.Joiner -import com.google.common.collect.Lists -import info.nightscout.database.impl.AppRepository -import info.nightscout.database.impl.transactions.CancelCurrentTemporaryTargetIfAnyTransaction -import info.nightscout.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction +import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CancelCurrentTemporaryTargetIfAnyTransaction +import app.aaps.database.impl.transactions.InsertAndCancelCurrentTemporaryTargetTransaction import app.aaps.ui.R import app.aaps.ui.databinding.DialogTemptargetBinding +import com.google.common.base.Joiner +import com.google.common.collect.Lists import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DecimalFormat diff --git a/ui/src/main/kotlin/app/aaps/ui/dialogs/TreatmentDialog.kt b/ui/src/main/kotlin/app/aaps/ui/dialogs/TreatmentDialog.kt index 0fbb229a40..a19f8a6a47 100644 --- a/ui/src/main/kotlin/app/aaps/ui/dialogs/TreatmentDialog.kt +++ b/ui/src/main/kotlin/app/aaps/ui/dialogs/TreatmentDialog.kt @@ -28,11 +28,11 @@ import app.aaps.core.ui.toast.ToastUtils import app.aaps.core.utils.HtmlHelper import app.aaps.database.entities.UserEntry import app.aaps.database.entities.ValueWithUnit -import com.google.common.base.Joiner -import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import app.aaps.ui.R import app.aaps.ui.databinding.DialogTreatmentBinding +import com.google.common.base.Joiner +import dagger.android.HasAndroidInjector import java.text.DecimalFormat import java.util.LinkedList import javax.inject.Inject diff --git a/ui/src/main/kotlin/app/aaps/ui/dialogs/WizardDialog.kt b/ui/src/main/kotlin/app/aaps/ui/dialogs/WizardDialog.kt index 103e71f81d..32246363a1 100644 --- a/ui/src/main/kotlin/app/aaps/ui/dialogs/WizardDialog.kt +++ b/ui/src/main/kotlin/app/aaps/ui/dialogs/WizardDialog.kt @@ -49,11 +49,11 @@ import app.aaps.core.main.wizard.BolusWizard import app.aaps.core.ui.toast.ToastUtils import app.aaps.core.utils.HtmlHelper import app.aaps.database.ValueWrapper -import dagger.android.HasAndroidInjector -import dagger.android.support.DaggerDialogFragment -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import app.aaps.ui.R import app.aaps.ui.databinding.DialogWizardBinding +import dagger.android.HasAndroidInjector +import dagger.android.support.DaggerDialogFragment import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DecimalFormat diff --git a/workflow/src/main/java/info/nightscout/workflow/LoadBgDataWorker.kt b/workflow/src/main/java/info/nightscout/workflow/LoadBgDataWorker.kt index 0d8b7b1202..805339ce81 100644 --- a/workflow/src/main/java/info/nightscout/workflow/LoadBgDataWorker.kt +++ b/workflow/src/main/java/info/nightscout/workflow/LoadBgDataWorker.kt @@ -14,7 +14,7 @@ import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.T import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.utils.receivers.DataWorkerStorage -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import kotlinx.coroutines.Dispatchers import javax.inject.Inject diff --git a/workflow/src/main/java/info/nightscout/workflow/PrepareBgDataWorker.kt b/workflow/src/main/java/info/nightscout/workflow/PrepareBgDataWorker.kt index 6a5044f6f4..b1db1f1e93 100644 --- a/workflow/src/main/java/info/nightscout/workflow/PrepareBgDataWorker.kt +++ b/workflow/src/main/java/info/nightscout/workflow/PrepareBgDataWorker.kt @@ -15,7 +15,7 @@ import app.aaps.core.main.graph.data.GlucoseValueDataPoint import app.aaps.core.main.graph.data.PointsWithLabelGraphSeries import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.utils.receivers.DataWorkerStorage -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import kotlinx.coroutines.Dispatchers import javax.inject.Inject diff --git a/workflow/src/main/java/info/nightscout/workflow/PrepareIobAutosensGraphDataWorker.kt b/workflow/src/main/java/info/nightscout/workflow/PrepareIobAutosensGraphDataWorker.kt index f6368cf573..6e8f715d77 100644 --- a/workflow/src/main/java/info/nightscout/workflow/PrepareIobAutosensGraphDataWorker.kt +++ b/workflow/src/main/java/info/nightscout/workflow/PrepareIobAutosensGraphDataWorker.kt @@ -31,9 +31,9 @@ import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.main.workflow.CalculationWorkflow import app.aaps.core.utils.receivers.DataWorkerStorage import app.aaps.database.ValueWrapper +import app.aaps.database.impl.AppRepository import com.jjoe64.graphview.series.BarGraphSeries import com.jjoe64.graphview.series.LineGraphSeries -import info.nightscout.database.impl.AppRepository import kotlinx.coroutines.Dispatchers import javax.inject.Inject import kotlin.math.abs diff --git a/workflow/src/main/java/info/nightscout/workflow/PreparePredictionsWorker.kt b/workflow/src/main/java/info/nightscout/workflow/PreparePredictionsWorker.kt index 72f3689eae..3ffbe186f7 100644 --- a/workflow/src/main/java/info/nightscout/workflow/PreparePredictionsWorker.kt +++ b/workflow/src/main/java/info/nightscout/workflow/PreparePredictionsWorker.kt @@ -17,8 +17,8 @@ import app.aaps.core.main.graph.data.GlucoseValueDataPoint import app.aaps.core.main.graph.data.PointsWithLabelGraphSeries import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.utils.receivers.DataWorkerStorage +import app.aaps.database.impl.AppRepository import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import kotlinx.coroutines.Dispatchers import java.util.Calendar import javax.inject.Inject diff --git a/workflow/src/main/java/info/nightscout/workflow/PrepareTemporaryTargetDataWorker.kt b/workflow/src/main/java/info/nightscout/workflow/PrepareTemporaryTargetDataWorker.kt index 15b2d5d089..fd9b66264f 100644 --- a/workflow/src/main/java/info/nightscout/workflow/PrepareTemporaryTargetDataWorker.kt +++ b/workflow/src/main/java/info/nightscout/workflow/PrepareTemporaryTargetDataWorker.kt @@ -15,9 +15,9 @@ import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.main.workflow.CalculationWorkflow import app.aaps.core.utils.receivers.DataWorkerStorage import app.aaps.database.ValueWrapper +import app.aaps.database.impl.AppRepository import com.jjoe64.graphview.series.DataPoint import com.jjoe64.graphview.series.LineGraphSeries -import info.nightscout.database.impl.AppRepository import kotlinx.coroutines.Dispatchers import javax.inject.Inject import kotlin.math.max diff --git a/workflow/src/main/java/info/nightscout/workflow/PrepareTreatmentsDataWorker.kt b/workflow/src/main/java/info/nightscout/workflow/PrepareTreatmentsDataWorker.kt index 8bb9e4fd82..7a3dcee145 100644 --- a/workflow/src/main/java/info/nightscout/workflow/PrepareTreatmentsDataWorker.kt +++ b/workflow/src/main/java/info/nightscout/workflow/PrepareTreatmentsDataWorker.kt @@ -28,7 +28,7 @@ import app.aaps.core.main.workflow.CalculationWorkflow import app.aaps.core.utils.receivers.DataWorkerStorage import app.aaps.database.entities.Bolus import app.aaps.database.entities.TherapyEvent -import info.nightscout.database.impl.AppRepository +import app.aaps.database.impl.AppRepository import kotlinx.coroutines.Dispatchers import javax.inject.Inject diff --git a/workflow/src/main/java/info/nightscout/workflow/iob/IobCobOref1Worker.kt b/workflow/src/main/java/info/nightscout/workflow/iob/IobCobOref1Worker.kt index 956d453fd3..a8159cf0e2 100644 --- a/workflow/src/main/java/info/nightscout/workflow/iob/IobCobOref1Worker.kt +++ b/workflow/src/main/java/info/nightscout/workflow/iob/IobCobOref1Worker.kt @@ -28,8 +28,8 @@ import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.main.workflow.CalculationWorkflow import app.aaps.core.utils.receivers.DataWorkerStorage import app.aaps.database.ValueWrapper +import app.aaps.database.impl.AppRepository import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import kotlinx.coroutines.Dispatchers import java.util.Calendar import java.util.GregorianCalendar diff --git a/workflow/src/main/java/info/nightscout/workflow/iob/IobCobOrefWorker.kt b/workflow/src/main/java/info/nightscout/workflow/iob/IobCobOrefWorker.kt index c00cdf5bd4..c3482d9f93 100644 --- a/workflow/src/main/java/info/nightscout/workflow/iob/IobCobOrefWorker.kt +++ b/workflow/src/main/java/info/nightscout/workflow/iob/IobCobOrefWorker.kt @@ -26,8 +26,8 @@ import app.aaps.core.main.events.EventIobCalculationProgress import app.aaps.core.main.utils.worker.LoggingWorker import app.aaps.core.main.workflow.CalculationWorkflow import app.aaps.core.utils.receivers.DataWorkerStorage +import app.aaps.database.impl.AppRepository import dagger.android.HasAndroidInjector -import info.nightscout.database.impl.AppRepository import kotlinx.coroutines.Dispatchers import javax.inject.Inject import kotlin.math.abs