On adding comments to database schema

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

On adding comments to database schema

vanadium23
Hello, fellows.

There was once a proposal about ability to add comments to table/columns in postgres: https://code.djangoproject.com/ticket/18468
I re-read discussion in ticket, and it has ended with another proposal, that now migrations is within Django, so we can add this feature.

I want to make it as a third-party libs, but has come to thought that need to extend SchemaEditor, but it's not good for maintainability.
Also, not only postgres has this feature, but also MySQL.

Motivation for this feature is that some sort of users can view code comments without access to VCS of the project.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/484264c0-b7d1-4264-b8b5-8857847f6b53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: On adding comments to database schema

Jani Tiainen
Oracle supports comments as well.

7.3.2018 2.52 ip. "vanadium23" <[hidden email]> kirjoitti:
Hello, fellows.

There was once a proposal about ability to add comments to table/columns in postgres: https://code.djangoproject.com/ticket/18468
I re-read discussion in ticket, and it has ended with another proposal, that now migrations is within Django, so we can add this feature.

I want to make it as a third-party libs, but has come to thought that need to extend SchemaEditor, but it's not good for maintainability.
Also, not only postgres has this feature, but also MySQL.

Motivation for this feature is that some sort of users can view code comments without access to VCS of the project.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/484264c0-b7d1-4264-b8b5-8857847f6b53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAHn91oesnBvY-mWXoHWa3sf8Vri%2B1qwRHat1yF%2B8Sdm0pU-LhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: On adding comments to database schema

Aymeric Augustin
I think we could implement that feature.

(Yes I changed my mind from six years ago when I wontfix'd the ticket.)

-- 
Aymeric.



On 8 Mar 2018, at 11:00, Jani Tiainen <[hidden email]> wrote:

Oracle supports comments as well.

7.3.2018 2.52 ip. "vanadium23" <[hidden email]> kirjoitti:
Hello, fellows.

There was once a proposal about ability to add comments to table/columns in postgres: https://code.djangoproject.com/ticket/18468
I re-read discussion in ticket, and it has ended with another proposal, that now migrations is within Django, so we can add this feature.

I want to make it as a third-party libs, but has come to thought that need to extend SchemaEditor, but it's not good for maintainability.
Also, not only postgres has this feature, but also MySQL.

Motivation for this feature is that some sort of users can view code comments without access to VCS of the project.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/484264c0-b7d1-4264-b8b5-8857847f6b53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAHn91oesnBvY-mWXoHWa3sf8Vri%2B1qwRHat1yF%2B8Sdm0pU-LhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/6B4870F7-F4B4-46D0-9102-EB840B3BD63C%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: On adding comments to database schema

vanadium23
That's good. I'll prepare the patch for review.

суббота, 10 марта 2018 г., 10:27:30 UTC+3 пользователь Aymeric Augustin написал:
I think we could implement that feature.

(Yes I changed my mind from six years ago when I wontfix'd the ticket.)

-- 
Aymeric.



On 8 Mar 2018, at 11:00, Jani Tiainen <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="DUmmXM1hBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">red...@...> wrote:

Oracle supports comments as well.

7.3.2018 2.52 ip. "vanadium23" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="DUmmXM1hBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">cherno...@...> kirjoitti:
Hello, fellows.

There was once a proposal about ability to add comments to table/columns in postgres: <a href="https://code.djangoproject.com/ticket/18468" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F18468\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEz-z_PguZbSmHnktH6NT0xkBOqUg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F18468\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEz-z_PguZbSmHnktH6NT0xkBOqUg&#39;;return true;">https://code.djangoproject.com/ticket/18468
I re-read discussion in ticket, and it has ended with another proposal, that now migrations is within Django, so we can add this feature.

I want to make it as a third-party libs, but has come to thought that need to extend SchemaEditor, but it's not good for maintainability.
Also, not only postgres has this feature, but also MySQL.

Motivation for this feature is that some sort of users can view code comments without access to VCS of the project.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="DUmmXM1hBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-develop...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="DUmmXM1hBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-d...@googlegroups.com.
Visit this group at <a href="https://groups.google.com/group/django-developers" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/django-developers&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-developers&#39;;return true;">https://groups.google.com/group/django-developers.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-developers/484264c0-b7d1-4264-b8b5-8857847f6b53%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-developers/484264c0-b7d1-4264-b8b5-8857847f6b53%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-developers/484264c0-b7d1-4264-b8b5-8857847f6b53%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-developers/484264c0-b7d1-4264-b8b5-8857847f6b53%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="DUmmXM1hBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-develop...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="DUmmXM1hBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-d...@googlegroups.com.
Visit this group at <a href="https://groups.google.com/group/django-developers" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/django-developers&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-developers&#39;;return true;">https://groups.google.com/group/django-developers.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-developers/CAHn91oesnBvY-mWXoHWa3sf8Vri%2B1qwRHat1yF%2B8Sdm0pU-LhQ%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-developers/CAHn91oesnBvY-mWXoHWa3sf8Vri%2B1qwRHat1yF%2B8Sdm0pU-LhQ%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-developers/CAHn91oesnBvY-mWXoHWa3sf8Vri%2B1qwRHat1yF%2B8Sdm0pU-LhQ%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-developers/CAHn91oesnBvY-mWXoHWa3sf8Vri%2B1qwRHat1yF%2B8Sdm0pU-LhQ%40mail.gmail.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/f37ea3f6-1f9c-4699-8feb-c85d024130e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: On adding comments to database schema

vanadium23
Hi, community.

I've been stuck at realization, because Postgres and oracle have a syntax like comment on {table}.{column} for storing comments, so this needs to be done after table/column creation.

So there are two ways:
1. Add it to post migrate signal, as for content types. But I can implement it as a third-party lib
2. Add this SQL after database creation in schema.py
Which way is better?

воскресенье, 11 марта 2018 г., 11:34:46 UTC+3 пользователь vanadium23 написал:
That's good. I'll prepare the patch for review.

суббота, 10 марта 2018 г., 10:27:30 UTC+3 пользователь Aymeric Augustin написал:
I think we could implement that feature.

(Yes I changed my mind from six years ago when I wontfix'd the ticket.)

-- 
Aymeric.



On 8 Mar 2018, at 11:00, Jani Tiainen <[hidden email]> wrote:

Oracle supports comments as well.

7.3.2018 2.52 ip. "vanadium23" <[hidden email]> kirjoitti:
Hello, fellows.

There was once a proposal about ability to add comments to table/columns in postgres: <a href="https://code.djangoproject.com/ticket/18468" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F18468\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEz-z_PguZbSmHnktH6NT0xkBOqUg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F18468\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEz-z_PguZbSmHnktH6NT0xkBOqUg&#39;;return true;">https://code.djangoproject.com/ticket/18468
I re-read discussion in ticket, and it has ended with another proposal, that now migrations is within Django, so we can add this feature.

I want to make it as a third-party libs, but has come to thought that need to extend SchemaEditor, but it's not good for maintainability.
Also, not only postgres has this feature, but also MySQL.

Motivation for this feature is that some sort of users can view code comments without access to VCS of the project.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="https://groups.google.com/group/django-developers" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/django-developers&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-developers&#39;;return true;">https://groups.google.com/group/django-developers.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-developers/484264c0-b7d1-4264-b8b5-8857847f6b53%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-developers/484264c0-b7d1-4264-b8b5-8857847f6b53%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-developers/484264c0-b7d1-4264-b8b5-8857847f6b53%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-developers/484264c0-b7d1-4264-b8b5-8857847f6b53%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="https://groups.google.com/group/django-developers" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/django-developers&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-developers&#39;;return true;">https://groups.google.com/group/django-developers.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-developers/CAHn91oesnBvY-mWXoHWa3sf8Vri%2B1qwRHat1yF%2B8Sdm0pU-LhQ%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-developers/CAHn91oesnBvY-mWXoHWa3sf8Vri%2B1qwRHat1yF%2B8Sdm0pU-LhQ%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-developers/CAHn91oesnBvY-mWXoHWa3sf8Vri%2B1qwRHat1yF%2B8Sdm0pU-LhQ%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-developers/CAHn91oesnBvY-mWXoHWa3sf8Vri%2B1qwRHat1yF%2B8Sdm0pU-LhQ%40mail.gmail.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/9ff6c9f5-045e-4bc7-8331-060471b012e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: On adding comments to database schema

Aymeric Augustin
Hello,

My gut feeling is that I'd rather implement this in the migrations engine (your option 1) than bolt it on (the option 2).

Disclaimer — I don't know the migrations engine all that well.

Best regards,

-- 
Aymeric.



On 18 Mar 2018, at 07:12, vanadium23 <[hidden email]> wrote:

Hi, community.

I've been stuck at realization, because Postgres and oracle have a syntax like comment on {table}.{column} for storing comments, so this needs to be done after table/column creation.

So there are two ways:
1. Add it to post migrate signal, as for content types. But I can implement it as a third-party lib
2. Add this SQL after database creation in schema.py
Which way is better?

воскресенье, 11 марта 2018 г., 11:34:46 UTC+3 пользователь vanadium23 написал:
That's good. I'll prepare the patch for review.

суббота, 10 марта 2018 г., 10:27:30 UTC+3 пользователь Aymeric Augustin написал:
I think we could implement that feature.

(Yes I changed my mind from six years ago when I wontfix'd the ticket.)

-- 
Aymeric.



On 8 Mar 2018, at 11:00, Jani Tiainen <[hidden email]> wrote:

Oracle supports comments as well.

7.3.2018 2.52 ip. "vanadium23" <[hidden email]> kirjoitti:
Hello, fellows.

There was once a proposal about ability to add comments to table/columns in postgres: https://code.djangoproject.com/ticket/18468
I re-read discussion in ticket, and it has ended with another proposal, that now migrations is within Django, so we can add this feature.

I want to make it as a third-party libs, but has come to thought that need to extend SchemaEditor, but it's not good for maintainability.
Also, not only postgres has this feature, but also MySQL.

Motivation for this feature is that some sort of users can view code comments without access to VCS of the project.

-- 
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/484264c0-b7d1-4264-b8b5-8857847f6b53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAHn91oesnBvY-mWXoHWa3sf8Vri%2B1qwRHat1yF%2B8Sdm0pU-LhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/9ff6c9f5-045e-4bc7-8331-060471b012e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/8B35E1D5-617B-4C13-BA0D-20F409C52641%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.