[Django] #30778: keep the table name lowercase

6 views
Skip to first unread message

Django

unread,
Sep 17, 2019, 4:55:26 AM9/17/19
to django-...@googlegroups.com
#30778: keep the table name lowercase
-----------------------------------------+------------------------
Reporter: a372661369 | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
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)'

--
Ticket URL: <https://code.djangoproject.com/ticket/30778>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 17, 2019, 4:56:44 AM9/17/19
to django-...@googlegroups.com
#30778: keep the table name lowercase
-------------------------------+--------------------------------------

Reporter: a372661369 | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by a372661369:

Old description:

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

New description:

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

--

--
Ticket URL: <https://code.djangoproject.com/ticket/30778#comment:1>

Django

unread,
Sep 17, 2019, 6:49:13 AM9/17/19
to django-...@googlegroups.com
#30778: Use lowercased app_labels for generated table names.
-------------------------------------+-------------------------------------
Reporter: a372661369 | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* resolution: => wontfix
* component: Uncategorized => Database layer (models, ORM)
* version: 2.2 => master
* type: Uncategorized => Cleanup/optimization


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/30778#comment:2>

Reply all
Reply to author
Forward
0 new messages