From 7df80eebe0d7c14c803a8375c39f00c2c49c61f5 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 10 Oct 2023 23:19:34 +0200 Subject: [PATCH] More detailed info on clearing database --- .../app/aaps/database/impl/AppRepository.kt | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/database/impl/src/main/java/app/aaps/database/impl/AppRepository.kt b/database/impl/src/main/java/app/aaps/database/impl/AppRepository.kt index 0e82476a24..c5cb3fbcd4 100644 --- a/database/impl/src/main/java/app/aaps/database/impl/AppRepository.kt +++ b/database/impl/src/main/java/app/aaps/database/impl/AppRepository.kt @@ -105,23 +105,23 @@ import kotlin.math.roundToInt removed.add(Pair("HeartRate", database.heartRateDao.deleteOlderThan(than))) if (deleteTrackedChanges) { - removed.add(Pair("GlucoseValue", database.glucoseValueDao.deleteTrackedChanges())) - removed.add(Pair("TherapyEvent", database.therapyEventDao.deleteTrackedChanges())) - removed.add(Pair("TemporaryBasal", database.temporaryBasalDao.deleteTrackedChanges())) - removed.add(Pair("Bolus", database.bolusDao.deleteTrackedChanges())) - removed.add(Pair("ExtendedBolus", database.extendedBolusDao.deleteTrackedChanges())) - removed.add(Pair("MultiWaveBolus", database.multiwaveBolusLinkDao.deleteTrackedChanges())) - // keep TDD removed.add(Pair("TotalDailyDose", database.totalDailyDoseDao.deleteTrackedChanges())) - removed.add(Pair("Carbs", database.carbsDao.deleteTrackedChanges())) - removed.add(Pair("TemporaryTarget", database.temporaryTargetDao.deleteTrackedChanges())) - removed.add(Pair("ApsResultLink", database.apsResultLinkDao.deleteTrackedChanges())) - removed.add(Pair("BolusCalculatorResult", database.bolusCalculatorResultDao.deleteTrackedChanges())) - removed.add(Pair("EffectiveProfileSwitch", database.effectiveProfileSwitchDao.deleteTrackedChanges())) - removed.add(Pair("ProfileSwitch", database.profileSwitchDao.deleteTrackedChanges())) - removed.add(Pair("ApsResult", database.apsResultDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES GlucoseValue", database.glucoseValueDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES TherapyEvent", database.therapyEventDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES TemporaryBasal", database.temporaryBasalDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES Bolus", database.bolusDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES ExtendedBolus", database.extendedBolusDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES MultiWaveBolus", database.multiwaveBolusLinkDao.deleteTrackedChanges())) + // keep TDD removed.add(Pair("CHANGES TotalDailyDose", database.totalDailyDoseDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES Carbs", database.carbsDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES TemporaryTarget", database.temporaryTargetDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES ApsResultLink", database.apsResultLinkDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES BolusCalculatorResult", database.bolusCalculatorResultDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES EffectiveProfileSwitch", database.effectiveProfileSwitchDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES ProfileSwitch", database.profileSwitchDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES ApsResult", database.apsResultDao.deleteTrackedChanges())) // keep food database.foodDao.deleteHistory() - removed.add(Pair("OfflineEvent", database.offlineEventDao.deleteTrackedChanges())) - removed.add(Pair("HeartRate", database.heartRateDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES OfflineEvent", database.offlineEventDao.deleteTrackedChanges())) + removed.add(Pair("CHANGES HeartRate", database.heartRateDao.deleteTrackedChanges())) } val ret = StringBuilder() removed