<h3 dir="auto">Description</h3>
<p dir="auto">Added migration for creating <code class="notranslate">note_tags</code> DB table, created model file <code class="notranslate">NoteTag.rb</code>, updated associations with <code class="notranslate">Note</code> class and added <code class="notranslate">note_tag</code> factory and unit tests <code class="notranslate">NoteTagTests</code> for testing basic functionalities (key/value lengths validity, key/value lengths invalidity, orphaned tags invalidity and note-tags uniqueness).</p>
<p dir="auto">This PR is first step of adding support for map note tags described in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2621730431" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5294" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/5294/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/5294">#5294</a> and which fully implementation can be found <a href="https://github.com/nenad-vujicic/openstreetmap-website/tree/issue_5294_poc">here</a> (decomposed to smaller because of simpler review).</p>
<h3 dir="auto">How has this been tested?</h3>
<p dir="auto">Tested by running linters from <code class="notranslate">lint.yml</code> workflow, unit tests and by manually inserting note-tags manipulations and as part of <a href="https://github.com/nenad-vujicic/openstreetmap-website/tree/issue_5294_poc">complete implementation</a> locally.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5323'>https://github.com/openstreetmap/openstreetmap-website/pull/5323</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5323/commits/2c49d7735820973da29a0367fc575903d89cd328" class="commit-link">2c49d77</a> Added NoteTag model and note_tags table</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5323/commits/fbcf7fc18731dc09d7081d500d464f0b0407de7b" class="commit-link">fbcf7fc</a> Added note_tag factory and NoteTag model test-case</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5323/files">7 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5323/files#diff-08ddccf408b18937e98b422e555eaf851c2a02c3ba815c5aeb8bc00efe65ecab">app/models/note.rb</a>
(2)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5323/files#diff-81be17ec98bec3c251b17903545e5895fe358d39325ab06eb5c343a00e7dd56a">app/models/note_tag.rb</a>
(20)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5323/files#diff-91e633b8a2cb0093761aafc0eae1adf636649c69196d6a7d600994f6ed9ecd57">db/migrate/20241030122707_create_note_tags.rb</a>
(13)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5323/files#diff-1dd5a8f580b9615769ddc19a64a98f455d9d20eb149c443f41d9d3c797d39b12">db/structure.sql</a>
(35)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5323/files#diff-9bda23e9b0c9dbd54b3d4f4e846031f867317f30b673a60c72e6a9b06621b960">test/factories/note_tags.rb</a>
(8)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5323/files#diff-078e5422bfa21f5f9d55a3aad882afb7e66b6e8706291b7d6ec7263053d061a2">test/fixtures/note_tags.yml</a>
(11)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5323/files#diff-35e08b22421302c54865eb32008165be551c0c934e972f08cb69f2c1d488eaab">test/models/note_tag_test.rb</a>
(49)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5323.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5323.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5323.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5323.diff</a></li>
</ul>
<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/pull/5323">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLL2OEC3SDGYOTR3CQT2ASY5PAVCNFSM6AAAAABRZB2P6CVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY2TSMBTGI3DIMY">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLH3ASPA4WGZSKQJU32ASY5PA5CNFSM6AAAAABRZB2P6CWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHJ47M6IM.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/pull/5323</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/pull/5323",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5323",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>