Opened 9 years ago
Closed 9 years ago
#26808 closed New feature (fixed)
Support adding class based indexes from Meta class
| Reported by: | Akshesh Doshi | Owned by: | Akshesh Doshi |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev |
| Severity: | Normal | Keywords: | db-indexes |
| Cc: | emorley@… | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Now that class based indexes are for real and can be added via migration files using AddIndex operation, we should allow index addition from Meta class as well.
Users will then be able to create indexes by defining something like the following in their models:
class Meta:
indexes = [
models.Index(fields=['foo', 'bar'], name='my_index_name_idx')
]
Change History (6)
comment:1 by , 9 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 9 years ago
comment:3 by , 9 years ago
| Has patch: | set |
|---|---|
| Status: | new → assigned |
comment:4 by , 9 years ago
| Cc: | added |
|---|
comment:5 by , 9 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Note:
See TracTickets
for help on using tickets.
In f7e00b40: