Hello!

I am writing about the issues:
https://code.djangoproject.com/ticket/13867
https://code.djangoproject.com/ticket/18468

I am not the author of these issues, but I think this feature is
interesting to have in the ORM.
I agree that we should not do things just because we can make!

In the source code often put comments to clarify things. These comments for
the same project
developer or someone who looks at the source code are often useful to know
how
something works or understand something that is not entirely clear.

In SQL's absolutely the same case. Sometimes you need to make comments on
both tables to clarify
the purpose and functionality, and in columns. All assume that if you want
to understand something,
 look at the source code, but this may not always be so.

Right now, the behavior to make comments can be emulated using sql
fixtures. And it has these drawbacks:

* Is not portable between different database backends, 3 files need to
write redundant for this in mysql,
postgresql and sqlite (sqlite does not natively support comments, but you
can emulate sql
http://stackoverflow.com/questions/7426205/sqlite comments
-adding-comments-to-tables-and-columns )

* It is more tedious to write SQL statements and you end up not making the
comments.

Is a low priority feature (obviously) but I think it's something that could
facilitate the ORM.

My first proposal is:
Comments to model tables (for mysql, postgresql and sqlite3) as the first
patch.
Without any kind of magic by django, a simple attribute "comment" on object
"Meta".

My initial proposal for postgresql implementation:
https://github.com/niwibe/django/tree/issue_18468

Andrei Antoukh

PD: sorry for my poor inglish

-- 
Andrei Antoukh - <[email protected]>
http://www.niwi.be/page/about/
http://www.kaleidos.net/A5694F/

"Linux is for people who hate Windows, BSD is for people who love UNIX"
"Social Engineer -> Because there is no patch for human stupidity"

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to