--
Ticket URL: <https://code.djangoproject.com/ticket/28407>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> when use inspectdb make model from db.
> the db column is created by dba, not developer .
> so db column comments set to models Field is helpful for developer.
> like
> {{{
> field = models.IntegerField(blank=True, null=True) #comments in db
> }}}
> [https://github.com/django/django/pull/8738]
New description:
when use inspectdb make model from db.
the db column is created by dba, not developer .
so db column comments set to models Field is helpful for developer.
like
{{{
field = models.IntegerField(blank=True, null=True) #comments in db
}}}
[https://github.com/django/django/pull/8770]
--
--
Ticket URL: <https://code.djangoproject.com/ticket/28407#comment:1>
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
* needs_tests: 0 => 1
Comment:
I think the comment should be prefixed with something like `Column
comment: `. Also tests are required.
--
Ticket URL: <https://code.djangoproject.com/ticket/28407#comment:2>
Comment (by 007gzs):
sorry i donot know how can i add a db with comment in tests.
--
Ticket URL: <https://code.djangoproject.com/ticket/28407#comment:3>
Comment (by Tim Graham):
I think it would involve something like adding a
`BaseDatabaseSchemaEditor.sql_create_column_comment` attribute with the
SQL for creating a column comment. Then the test can use that.
--
Ticket URL: <https://code.djangoproject.com/ticket/28407#comment:4>
* status: new => closed
* resolution: => duplicate
Comment:
Adding column comments as a model field option is accepted in #18468.
--
Ticket URL: <https://code.djangoproject.com/ticket/28407#comment:5>