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