Opened 17 years ago

Closed 16 years ago

Last modified 13 years ago

#7186 closed (fixed)

Django creates redundant unique index for OneToOneField on MySQL

Reported by: Peter Melvyn Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords: qsrf-cleanup MySQL redundant unique index
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I've noticed, that Django r7411 still generates reduntandt unique indeces when Unique=True, db_index=True and reopened ticked #3030.

Then I updated to r7519 (current head) and discovered, that reduntant unique index is create for OneToOneField (MySQL creates inherent foreign key on UNIQUE column declaration)

Change History (7)

comment:1 by Sylvain Fankhauser, 17 years ago

I've already filled a bug report for the OneToOneField problem here :
http://code.djangoproject.com/ticket/7170

comment:2 by George Vilches, 17 years ago

Keywords: qsrf-cleanup added

comment:3 by David Reynolds, 17 years ago

Component: django.core.mailDatabase wrapper

comment:4 by Jacob, 17 years ago

milestone: 1.0

comment:5 by Simon Greenhill, 17 years ago

Triage Stage: UnreviewedAccepted

comment:6 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(In [7790]) Make sure we only create the minimum number of table indexes for MySQL.

This patch simplifies a bunch of code for all backends and removes some
duplicate index creation for MySQL, in particular (versions 4.x and later).
Patch from Nis Jørgensen.

Fixed #5671, #5680, #7170, #7186.

comment:5 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top