<p></p>
<p dir="auto">We have a so called <em>note comments</em> table:</p>
<div class="highlight highlight-source-sql" dir="auto"><pre class="notranslate"><span class="pl-k">CREATE</span> <span class="pl-k">TABLE</span> <span class="pl-en">public</span>.note_comments (
id <span class="pl-k">bigint</span> <span class="pl-k">NOT NULL</span>,
note_id <span class="pl-k">bigint</span> <span class="pl-k">NOT NULL</span>,
visible <span class="pl-k">boolean</span> <span class="pl-k">NOT NULL</span>,
created_at <span class="pl-k">timestamp without time zone</span> <span class="pl-k">NOT NULL</span>,
author_ip <span class="pl-k">inet</span>,
author_id <span class="pl-k">bigint</span>,
body <span class="pl-k">text</span>, <span class="pl-c"><span class="pl-c">--</span> (a) not always a comment</span>
event <span class="pl-c1">public</span>.<span class="pl-c1">note_event_enum</span> <span class="pl-c"><span class="pl-c">--</span> (b) not a comment</span>
);</pre></div>
<p dir="auto">As you can see, it contains things that are <em>not</em> comments:</p>
<ul dir="auto">
<li><em>(a)</em>: <code class="notranslate">text</code> is a description in case of opening events</li>
<li><em>(b)</em>: <code class="notranslate">event</code> is not a comment of course, other comment tables don't have <em>events</em></li>
</ul>
<p dir="auto">Here's the changeset comments table for comparison:</p>
<div class="highlight highlight-source-sql" dir="auto"><pre class="notranslate"><span class="pl-k">CREATE</span> <span class="pl-k">TABLE</span> <span class="pl-en">public</span>.changeset_comments (
id <span class="pl-k">integer</span> <span class="pl-k">NOT NULL</span>,
changeset_id <span class="pl-k">bigint</span> <span class="pl-k">NOT NULL</span>,
author_id <span class="pl-k">bigint</span> <span class="pl-k">NOT NULL</span>,
body <span class="pl-k">text</span> <span class="pl-k">NOT NULL</span>,
created_at <span class="pl-k">timestamp without time zone</span> <span class="pl-k">NOT NULL</span>,
visible <span class="pl-k">boolean</span> <span class="pl-k">NOT NULL</span>
);</pre></div>
<p dir="auto">You can turn <code class="notranslate">note_comments</code> table into an actual comments table if you remove things that are not comments (opening event rows, rows without comment text, <code class="notranslate">event</code> column). But you can also turn it into a note version table if you remove other things (comment event rows), modify some (<code class="notranslate">text</code> to always contain the description) and add what's missing (version numbers).</p>
<p dir="auto">If we replace <code class="notranslate">note_comments</code> with two tables as described above, we'll have a pure comments table and a versions table. Then we can add tags referencing the versions table.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/5294#issuecomment-2541527509">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKLECSQISRUEXKE3KT2FLSCBAVCNFSM6AAAAABQ2HD3MWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBRGUZDONJQHE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLKHV47NWP6E4BJH2JL2FLSCBA5CNFSM6AAAAABQ2HD3MWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUXPSQ5K.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/5294/2541527509</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/5294#issuecomment-2541527509",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/5294#issuecomment-2541527509",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>