#35274: Avoid creating index using db_index=False for a CharField which is a primary key -------------------------------------+------------------------------------- Reporter: ChamathAilapperuma | Owner: nobody Type: Bug | Status: closed Component: Database layer | Version: 4.2 (models, ORM) | Severity: Normal | Resolution: wontfix Keywords: primary_key, | Triage Stage: db_index | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by David Sanders):
* resolution: => wontfix * status: new => closed Comment: Thanks, though not sure what you're trying to achieve. Specifying "primary key" on a field implies that unique indexes will be created, otherwise fks won't be able to target it. If your goal is to simply remove the "_like" index then you can do this by wrapping the auto-generated migration in a `SeparateDatabaseAndState` migration to customise the way it creates the table. Honestly though it sounds like you could benefit from starting a thread on the Django forum to discuss your problem, others may have additional ways to help you: https://www.djangoproject.com/community/ -- Ticket URL: <https://code.djangoproject.com/ticket/35274#comment:1> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/0107018e124de86d-d149089c-b59f-4d78-8aa6-caa2c9aec067-000000%40eu-central-1.amazonses.com.