#34708 closed Bug (invalid)

db_index=True doesn't apply on MySQL.

Reported by: DongHun Oh Owned by: nobody
Component: Database layer (models, ORM) Version: 3.2
Severity: Normal Keywords: ORM, db_index, mysql
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

As the title says, sometimes db_index=True doesn't apply

When performing makemigration, changes in db_index were checked, and when the contents were migrated, the contents were not applied to mysql.

Can you tell me what could be the reason for this and how to fix it?

Django : 3.2.19
Python : 3.8.1
DB : MySQL 8.0

Change History (1)

comment:1 by Mariusz Felisiak, 18 months ago

Resolution: invalid
Status: newclosed
Summary: Sometimes `db_index=True` doesn't applydb_index=True doesn't apply on MySQL.

MySQL doesn't support database indexes of various columns. I don't think you've explained the issue in enough detail to confirm a bug in Django. If you're having trouble understanding how Django works, see TicketClosingReasons/UseSupportChannels for ways to get help.

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