From 601551b29d618ce04ce35ad7b3e33e422b876396 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Mon, 31 Mar 2025 12:25:49 -0400 Subject: [PATCH] Set redeemer fee to null if it is not null Drastically speeds up the no ledger migration --- cardano-db/src/Cardano/Db/Migration.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cardano-db/src/Cardano/Db/Migration.hs b/cardano-db/src/Cardano/Db/Migration.hs index be65062c1..6578066f1 100644 --- a/cardano-db/src/Cardano/Db/Migration.hs +++ b/cardano-db/src/Cardano/Db/Migration.hs @@ -396,7 +396,7 @@ readStageFromFilename fn = noLedgerMigrations :: SqlBackend -> Trace IO Text -> IO () noLedgerMigrations backend trce = do void $ runDbIohkLogging backend trce $ do - rawExecute "update redeemer set fee = null" [] + rawExecute "update redeemer set fee = null where fee is not null" [] rawExecute "delete from reward" [] rawExecute "delete from epoch_stake" [] rawExecute "delete from ada_pots" []