#5805 closed New feature (fixed)
Specify multicolumn indexes.
Reported by: | Owned by: | Alex Gaynor | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | index multicolumn indexes database dceu2011 |
Cc: | fnl, martin.paquette@…, diegobz, Apostolis Bessas, jeffrey@…, gert.vangool@…, mike@…, Gillingham@…, charette.s@…, Ivan Virabyan, Danilo Bargen | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It would be good if we could specify multicolumn indexes to be created in the model, sort of like unique_together but for index_together. I am not familiar with a way to do this currently, hence this feature request.
Attachments (1)
Change History (26)
comment:1 by , 17 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 by , 15 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
#373 is for multi column primary keys, not indexes.
comment:3 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 by , 15 years ago
Cc: | added |
---|
comment:5 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:6 by , 14 years ago
Cc: | added |
---|---|
Easy pickings: | unset |
comment:7 by , 14 years ago
Cc: | added |
---|
comment:8 by , 14 years ago
Cc: | added |
---|
comment:9 by , 13 years ago
Cc: | added |
---|
comment:10 by , 13 years ago
Keywords: | dceu2011 added |
---|---|
Owner: | changed from | to
Status: | reopened → new |
UI/UX: | unset |
comment:11 by , 13 years ago
Has patch: | set |
---|
Added a patch with docs and simple test. Which I tested on MySQL, PostgreSQL and SQLite
comment:12 by , 13 years ago
Needs tests: | set |
---|---|
Status: | new → assigned |
We still need to check if the indexes are being created. For this we need better database introspection for indexes. For this #16220 will need to be fixed first. Till that moment, this ticket is on hold.
comment:13 by , 13 years ago
Cc: | added |
---|
comment:14 by , 13 years ago
Cc: | added |
---|
comment:15 by , 13 years ago
Cc: | added |
---|
comment:16 by , 13 years ago
Cc: | added |
---|
comment:18 by , 13 years ago
Cc: | added |
---|
comment:19 by , 12 years ago
Cc: | added |
---|
comment:20 by , 12 years ago
I hope it's not too late to get this into 1.5. This functionality would be extremely nice as a complement to the db_index functionality currently in Django.
comment:21 by , 12 years ago
The patch was working fine for trunk 10 months ago. Only tests couldn't be written because of the broken django DB introspection (see related ticket).
comment:22 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
comment:24 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Dupe of #373, which is pending the queryset rewrite/refactor I believe..