Opened 5 years ago
Closed 5 years ago
#30778 closed Cleanup/optimization (wontfix)
Use lowercased app_labels for generated table names.
Reported by: | lintong | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
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 (last modified by )
if possible, to avoid any problems that might arise from this behavior. Django uses lowercase table names when it auto-generates table names from models, so this is mainly a consideration if you are overriding the table name via the db_table parameter.
--django don't avoid the app label maybe uppercase, it should be
'self.db_table = "%s_%s" % (self.app_label.lower(), self.model_name)'
Change History (2)
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
comment:2 by , 5 years ago
Component: | Uncategorized → Database layer (models, ORM) |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Summary: | keep the table name lowercase → Use lowercased app_labels for generated table names. |
Type: | Uncategorized → Cleanup/optimization |
Version: | 2.2 → master |
Note:
See TracTickets
for help on using tickets.
Thanks for this ticket, however proposed change would be a backward incompatible. Moreover this behavior is in Django from the very beginning and it isn't an issue that
app_label
is mixed-case, everything should works properly.