[openstreetmap/openstreetmap-website] Adds version to notes table and creates note_versions table (PR #5815)

Nenad Vujicic notifications at github.com
Mon Mar 17 10:04:22 UTC 2025


### Description

PR adds `version` column to `notes` table for keeping version number of the latest note's version and creates `note_versions` table for keeping all notes versions. This is based on [this comment](https://github.com/openstreetmap/openstreetmap-website/issues/5294#issuecomment-2541604426), but without creating indices, associations, .. (will be created when we need them). Also, PR proposes using `note_versions` instead of using `old_notes` based on [this comment](https://github.com/openstreetmap/openstreetmap-website/issues/5619#issuecomment-2661452123).

### How has this been tested?

Automated unit tests and manual testing
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5815

-- Commit Summary --

  * Adds note versioning and adds note_versions table
  * Adds migration script for validating note versions

-- File Changes --

    M app/models/note.rb (1)
    A app/models/note_version.rb (23)
    A db/migrate/20250316212229_create_note_versions.rb (21)
    A db/migrate/20250316214151_validate_note_versions.rb (6)
    M db/structure.sql (47)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5815.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5815.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5815
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5815 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250317/6299e44e/attachment.htm>


More information about the rails-dev mailing list