feat(inspector): fail on duplicate index names per schema
PostgreSQL index names share the schema-wide relation namespace, so a reused name makes CREATE INDEX IF NOT EXISTS silently skip the duplicate. Add duplicate_index_name rule (enforce by default) covering indexes and PK/unique constraint backing indexes.
This commit is contained in:
@@ -123,6 +123,7 @@ rules:
|
||||
| `missing_primary_key` | `have_primary_key` | Ensure tables have primary keys |
|
||||
| `orphaned_foreign_key` | `orphaned_foreign_key` | Detect FKs referencing non-existent tables |
|
||||
| `circular_dependency` | `circular_dependency` | Detect circular FK dependencies |
|
||||
| `duplicate_index_name` | `duplicate_index_name` | Index / PK / unique names must be unique per schema (default: `enforce`) |
|
||||
|
||||
## Rule Configuration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user