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 lintong)

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 lintong, 5 years ago

Description: modified (diff)

comment:2 by Mariusz Felisiak, 5 years ago

Component: UncategorizedDatabase layer (models, ORM)
Resolution: wontfix
Status: newclosed
Summary: keep the table name lowercaseUse lowercased app_labels for generated table names.
Type: UncategorizedCleanup/optimization
Version: 2.2master

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.

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