Null-safe split of the AiPullThroughPolicy single-active index (doc 09 §8)

FixInitializerService
Shipped
June 30, 2026 at 5:18 PM UTC
Author
Kamo
Commit
9709eab

CRDB is NULLs-distinct, so the single (lender_profile_id, market_id) WHERE status='ACTIVE' index did NOT backstop the org-wide (market_id IS NULL) grain — two concurrent first-publishes could leave two ACTIVE rows. Split into mlos_aiptp_one_active_mkt_uniq (per-market, market_id IS NOT NULL) + **************** (lender_profile_id alone, market_id IS NULL), mirroring **************** Drops the old mlos_aiptp_one_active_uniq.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing