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