#7466·dbal

对于强制唯一约束的索引,Schema comparison 会发出不必要的 `DROP INDEX` 指令

作者: morozov创建于 2026年7月18日更新于 2026年7月18日
标签Schema ComparisonIndexes

Every supported database platform implements a unique constraint with an index. Introspection reports that index as an ordinary `Index`. The comparator diffs indexes but does not diff unique constraints, so it treats the enforcing index as an independent object: the declared side has the constraint but no standalone index, the introspected side has the index unmatched against any constraint, and the index looks like a stray to drop.