diff --git a/database/src/main/resources/db/migration/V1_89__Delete_from_token_historical_daily.sql b/database/src/main/resources/db/migration/V1_89__Delete_from_token_historical_daily.sql new file mode 100644 index 00000000..08826c58 --- /dev/null +++ b/database/src/main/resources/db/migration/V1_89__Delete_from_token_historical_daily.sql @@ -0,0 +1,3 @@ +SELECT 'Deleting from token_historical_daily dates after 8/23/2023' AS comment; + +DELETE FROM token_historical_daily WHERE historical_timestamp > '2023-08-23 00:00:00'; diff --git a/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncService.kt b/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncService.kt index d36cd199..99263ba5 100644 --- a/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncService.kt +++ b/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncService.kt @@ -299,7 +299,7 @@ class AsyncService( startDate = latest.timestamp.minusDays(1) } val dlobRes = tokenService.getHistoricalFromDlob(startDate) ?: return - logger.info("Updating token historical data starting from $startDate with ${dlobRes.buy.size} buy record for roll-up.") + logger.info("Updating token historical data starting from $startDate with ${dlobRes.buy.size} buy records for roll-up.") val baseMap = Interval(startDate, today) .let { int -> generateSequence(int.start) { dt -> dt.plusDays(1) }.takeWhile { dt -> dt < int.end } }