Skip to content

Commit

Permalink
Delete old UpgradeCheck records
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Apr 17, 2019
1 parent fec34e4 commit 2c189d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Stack/Storage.hs
Original file line number Diff line number Diff line change
Expand Up @@ -556,4 +556,6 @@ upgradeChecksSince since = withStorage $ count [UpgradeCheckTimestamp >=. since]

-- | Log in the database that an upgrade check occurred at the given time.
logUpgradeCheck :: HasConfig env => UTCTime -> RIO env ()
logUpgradeCheck = withStorage . insert_ . UpgradeCheck
logUpgradeCheck time = withStorage $ do
deleteWhere ([] :: [Filter UpgradeCheck])
insert_ $ UpgradeCheck time

0 comments on commit 2c189d7

Please sign in to comment.