From 8de3e22ab43120d04af0de739c92ee865f079cb4 Mon Sep 17 00:00:00 2001 From: GPT on behalf of DHH <2741+dhh@users.noreply.github.com> Date: Wed, 7 Oct 2026 23:51:12 +0200 Subject: [PATCH] Clarify database task repair hook scope --- lib/tasks/room_messages_count.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tasks/room_messages_count.rake b/lib/tasks/room_messages_count.rake index 66c436a..e628729 100644 --- a/lib/tasks/room_messages_count.rake +++ b/lib/tasks/room_messages_count.rake @@ -1,6 +1,6 @@ -# Repair while DatabaseTasks still selects the database it loaded or migrated. -# db:prepare calls these methods directly, and test tasks restore their original -# pool before a Rake enhancement runs. This also avoids Rake's once-only invoke. +# Repair the database selected by each schema-load or migration operation. +# db:prepare calls DatabaseTasks directly, bypassing Rake enhancements; +# method hooks also run on every invocation. module RoomMessagesCountDatabaseTasks def load_schema(...) super.tap { repair_room_messages_count }