[openstreetmap/openstreetmap-website] Adds version to notes table and creates note_versions table (PR #5815)
Nenad Vujicic
notifications at github.com
Mon Mar 31 12:01:57 UTC 2025
nenad-vujicic left a comment (openstreetmap/openstreetmap-website#5815)
> I'm not sure if this should be part of this PR—maybe we should address the issue in another PR.
>
Well, I think it's same if we do this now or in next PR (but really next), because we cannot delay this because next steps will be:
- Create versions on `reopen` / `close` (where we'll have to set `note_version.note_comment_id` to `note_comment.id` which is created on new action)
- Generate note versions from `note_comments` (where we'll copy `note_comment.id` to `note_versions.note_comment_id` for every generated note version)
- Now we'll be able to do in parallel adding note tags and removing special note comments.
> Se also the last paragraph of [#5294 (comment)](https://github.com/openstreetmap/openstreetmap-website/issues/5294#issuecomment-2541604426), where I write about keeping `id` from api0.6-comments. Some of those api0.6-comments will become non-comments and will be deleted from the comments table. In this case their ids are lost. If we are to use them for sorting, we don't need exactly the same ids, anything that forms the same sequence will do.
>
@AntonKhorev thanks for this idea! I've just added new column `note_comment_id` and index on it. I'm only not sure about the new column name (perhaps more natural name would be `ordering_id` or similar? after removing note comments) and if index should be composite (I still don't have in my head all situations in which new column will be used and how).
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5815#issuecomment-2766013524
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5815/c2766013524 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250331/c03c341f/attachment-0001.htm>
More information about the rails-dev
mailing list