prisma-engines
ab73dcf0 - fix: preserve manually-created partial indexes when `partialIndexes` preview feature is disabled (#5790)

Commit
48 days ago
fix: preserve manually-created partial indexes when `partialIndexes` preview feature is disabled (#5790) Fixes #5789 and https://github.com/prisma/prisma/issues/29289 ### Problem #5780 stripped partial index predicates when `partialIndexes` is disabled, but manually-created partial indexes were still dropped as drift. ### Solution - Track indexes whose predicates were stripped due to feature-gating in `SqlSchema::feature_gated_partial_indexes` - Exclude them from `dropped_indexes` in the differ ### Changes - `sql-schema-describer`: Added `feature_gated_partial_indexes: HashSet<IndexId>` to track stripped indexes - `sql-schema-connector`: Skip feature-gated partial indexes in `dropped_indexes` - Added regression tests for PostgreSQL, MSSQL, SQLite, and CockroachDB <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Manual partial indexes are preserved (not dropped) when the partialIndexes preview feature is disabled, improving schema sync and diff stability. * **New Features** * Schema describe outputs now include metadata about stripped partial indexes and an API to query that state. * Preview-feature flags are propagated through diff and diagnose flows so tooling respects preview settings. * **Tests** * Added cross‑database tests ensuring manual partial indexes are ignored by migrations/diffs when the preview feature is off. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Author
Parents
Loading