#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 Changed 13 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
#373 is for multi column primary keys, not indexes.
comment:3 Changed 11 years ago by
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 Changed 11 years ago by
Cc: | fnl added |
---|
comment:5 Changed 10 years ago by
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:6 Changed 10 years ago by
Cc: | martin.paquette@… added |
---|---|
Easy pickings: | unset |
comment:7 Changed 10 years ago by
Cc: | diegobz added |
---|
comment:8 Changed 10 years ago by
Cc: | Apostolis Bessas added |
---|
comment:9 Changed 10 years ago by
Cc: | jeffrey@… added |
---|
comment:10 Changed 10 years ago by
Keywords: | dceu2011 added |
---|---|
Owner: | changed from nobody to Jeffrey Gelens |
Status: | reopened → new |
UI/UX: | unset |
comment:11 Changed 10 years ago by
Has patch: | set |
---|
Added a patch with docs and simple test. Which I tested on MySQL, PostgreSQL and SQLite
comment:12 Changed 10 years ago by
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 Changed 9 years ago by
Cc: | gert.vangool@… added |
---|
comment:14 Changed 9 years ago by
Cc: | mike@… added |
---|
comment:15 Changed 9 years ago by
Cc: | Gillingham@… added |
---|
comment:16 Changed 9 years ago by
Cc: | charette.s@… added |
---|
comment:18 Changed 9 years ago by
Cc: | Ivan Virabyan added |
---|
comment:19 Changed 9 years ago by
Cc: | Danilo Bargen added |
---|
comment:20 Changed 8 years ago by
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 Changed 8 years ago by
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 Changed 8 years ago by
Owner: | changed from Jeffrey Gelens to Alex Gaynor |
---|---|
Status: | assigned → new |
comment:24 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Dupe of #373, which is pending the queryset rewrite/refactor I believe..