Opened 6 years ago

Last modified 6 years ago

#25902 new New feature

app names with underscore conflict with many-to-many tables — at Version 1

Reported by: Amos Onn Owned by: nobody
Component: Core (System checks) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Amos Onn)

If you have an app called X with a model called Y with a m2m field called Z, the default table name for the m2m is X_Y_Z.
If you have an app called X_Y with a model called Z, the default table name for the model is also X_Y_Z.
If you have both, django breaks when creating the tables.
See a broken sample project at:
https://github.com/amosonn/check_underscore

Change History (1)

comment:1 Changed 6 years ago by Amos Onn

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top