[Django] #31393: Support SQL comment with help_text -> comment

7 views
Skip to first unread message

Django

unread,
Mar 22, 2020, 5:50:14 AM3/22/20
to django-...@googlegroups.com
#31393: Support SQL comment with help_text -> comment
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
KimSoungRyoul |
Type: New | Status: assigned
feature |
Component: | Version: master
Migrations |
Severity: Normal | Keywords: COMMENT help_text
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
why don't you support SQL COMMENT ?

help_text is useful for Developer

**BUT**

**DBA can not understand Django Models**
They want to see help_text with SQL not Python

This Issue causes a loss of communication costs between Developer to DBA

== **here is a solution**

== AS IS


{{{
class AModel(models.Model):
a_field = models.CharField(help_text="this is help text",
max_length=32, null=False)

class Meta:
db_table_comment =" this is comment"
}}}


-> python manage.py makemigrations
-> python manage.py migrate

Executed SQL (example Mysql)

{{{

create table a_model
(
a_field varchar(32) not null COMMENT 'this is help text'
) comment 'this is doc string';
}}}

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

Django

unread,
Mar 22, 2020, 7:01:05 AM3/22/20
to django-...@googlegroups.com
#31393: Support table SQL comments.
-------------------------------------+-------------------------------------
Reporter: KimSoungRyoul | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: duplicate

Keywords: COMMENT help_text | 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: assigned => closed
* resolution: => duplicate
* component: Migrations => Database layer (models, ORM)


Comment:

Duplicate of #18468.

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

Reply all
Reply to author
Forward
0 new messages