From e993c523ab122d4ca1fa75892815dda92f010638 Mon Sep 17 00:00:00 2001 From: Vojtech Knaisl Date: Thu, 22 Aug 2024 09:19:12 +0200 Subject: [PATCH] Truncate knowledge_model_cache table --- .../Migration/Production/Migration_0048_jsonb/Migration.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wizard-server/src/Wizard/Database/Migration/Production/Migration_0048_jsonb/Migration.hs b/wizard-server/src/Wizard/Database/Migration/Production/Migration_0048_jsonb/Migration.hs index 6f1142f00..25602e1f6 100644 --- a/wizard-server/src/Wizard/Database/Migration/Production/Migration_0048_jsonb/Migration.hs +++ b/wizard-server/src/Wizard/Database/Migration/Production/Migration_0048_jsonb/Migration.hs @@ -17,6 +17,7 @@ migrate dbPool = do changeColumnTypeFromJsonToJsonb dbPool replaceFunctionGetBranchStateWithJsonb dbPool dropBookReferenceTable dbPool + truncateKnowledgeModelTable dbPool changeColumnTypeFromJsonToJsonb dbPool = do let sql = @@ -89,3 +90,9 @@ dropBookReferenceTable dbPool = do let action conn = execute_ conn sql liftIO $ withResource dbPool action return Nothing + +truncateKnowledgeModelTable dbPool = do + let sql = "TRUNCATE knowledge_model_cache" + let action conn = execute_ conn sql + liftIO $ withResource dbPool action + return Nothing