﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
13867	Feature request: Comments in Django models saved to database schema	Renato Alves	nobody	"Currently there is no way to make comments in the schema via Django. The only way is to alter the tables and add the comments manually in the database.

This feature request presents one possible implementation.

For comments at the __table level__, use the first line of the Model __docstring__, truncating it depending on backend limitations.[[BR]]
For comments at the __column level__, include a __comment attribute__ on the Field declaration.
{{{
class Dummy(Model):
    """"""This comment goes into the schema.
    This and the following won't
    ...
    """"""
    dummy_name = CharField(max_length=20, comment=""All dummies should have names right?"")
    ...
}}}

In addition, a specific syntax could be used in the docstring to prevent undesired comments in already existing code to be transfered to the database."	New feature	closed	Database layer (models, ORM)	1.2	Normal	wontfix			Design decision needed	0	0	0	0	0	0
