Skip to content

Fix migration 101: Remove CURRENT_DATE from index predicate#498

Merged
bokelley merged 1 commit into
mainfrom
bokelley/addie-dm-not-responding
Jan 3, 2026
Merged

Fix migration 101: Remove CURRENT_DATE from index predicate#498
bokelley merged 1 commit into
mainfrom
bokelley/addie-dm-not-responding

Conversation

@bokelley

@bokelley bokelley commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixed migration 101_outreach_sentiment.sql which was failing because PostgreSQL partial indexes require IMMUTABLE functions in predicates
  • CURRENT_DATE is STABLE (not IMMUTABLE), so removed it from the index predicate
  • The date filtering can happen at query time instead

Problem

The app wasn't starting because migration 101 was failing with:

error: functions in index predicate must be marked IMMUTABLE

Test plan

  • All existing tests pass
  • Verify app starts after deployment

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@bokelley bokelley merged commit 0d14fd4 into main Jan 3, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant