Opened 18 years ago

Closed 18 years ago

#3822 closed (fixed)

core.management.get_indexes_for_model does not quote index names

Reported by: Robin Breathe <robin@…> Owned by: Adrian Holovaty
Component: Core (Management commands) Version: dev
Severity: Keywords: sqlindexes
Cc: 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

If you're model's column names require quoting, the chances are high that the auto-generated index names will also require quoting (this bit me with a column named "user@realm").

Without this patch, manage.py sqlindexes (and the other functions which implicitly call core.management.get_indexs_for_model) may generate invalid output.

Attachments (1)

quote_index.diff (766 bytes ) - added by Robin Breathe <robin@…> 18 years ago.
patch

Download all attachments as: .zip

Change History (3)

by Robin Breathe <robin@…>, 18 years ago

Attachment: quote_index.diff added

patch

comment:1 by Simon G. <dev@…>, 18 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: newclosed

(In [4835]) Fixed #3822 -- Changed get_indexes_for_model() in django.core.management to quote index names. Thanks, Robin Breathe

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