Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#25025 closed Uncategorized (duplicate)

Django migration (>=1.7) like index

Reported by: TZanke Owned by: nobody
Component: Uncategorized Version: 1.7
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Django migration generates 'like' indexes for database text fields.

For example:

"auth_user_username_51b3b110094b8aae_like" btree (username varchar_pattern_ops)

I would like to explicitly set indexes in database.

Is it possible to disable like index generation with django migrations?

Change History (2)

comment:1 by Claude Paroz, 9 years ago

Resolution: needsinfo
Status: newclosed

If you don't want an "automatic" index, why simply not specify db_index on the field? If I missed the point, please develop your use case a bit more.

comment:2 by Tim Graham, 9 years ago

Resolution: needsinfoduplicate

Duplicate of #24507 and #24088. See also discussion on django-developers.

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