From a3f4ce7bf787d44f65cf6d60e1d1fb1982e591ce Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Sat, 3 Jan 2026 13:48:17 -0500 Subject: [PATCH] Fix migration 101: Remove CURRENT_DATE from index predicate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PostgreSQL requires partial index predicates to use IMMUTABLE functions, but CURRENT_DATE is STABLE. The date filtering can happen at query time instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- server/src/db/migrations/101_outreach_sentiment.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/db/migrations/101_outreach_sentiment.sql b/server/src/db/migrations/101_outreach_sentiment.sql index e52e5967c8..6365566ba8 100644 --- a/server/src/db/migrations/101_outreach_sentiment.sql +++ b/server/src/db/migrations/101_outreach_sentiment.sql @@ -35,7 +35,7 @@ CREATE INDEX IF NOT EXISTS idx_outreach_sentiment ON member_outreach(response_se CREATE INDEX IF NOT EXISTS idx_outreach_intent ON member_outreach(response_intent) WHERE response_intent IS NOT NULL; CREATE INDEX IF NOT EXISTS idx_outreach_follow_up ON member_outreach(follow_up_date) - WHERE follow_up_date IS NOT NULL AND follow_up_date > CURRENT_DATE; + WHERE follow_up_date IS NOT NULL; -- ===================================================== -- ENHANCE SLACK_USER_MAPPINGS