"createSql":"CREATE TABLE IF NOT 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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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)",