Closes #18191: Remove duplicate SQL indexes (#19074)

* Closes #18191: Remove redundant SQL indexes

* Update developer documentation

* Add a system check for duplicate indexes
This commit is contained in:
Jeremy Stretch
2025-04-03 16:16:57 -04:00
committed by GitHub
parent 6a966ee6c1
commit 67480dcf4f
11 changed files with 106 additions and 19 deletions

View File

@@ -6,7 +6,7 @@ Below is a list of tasks to consider when adding a new field to a core model.
Add the field to the model, taking care to address any of the following conditions.
* When adding a GenericForeignKey field, also add an index under `Meta` for its two concrete fields. For example:
* When adding a GenericForeignKey field, you may need add an index under `Meta` for its two concrete fields. (This is required only for non-unique GFK relationships, as the unique constraint introduces its own index.) For example:
```python
class Meta: