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 e5d9245 commit b85d072
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 @@ -557,4 +557,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 b85d072

Please sign in to comment.