[openstreetmap/openstreetmap-website] Proposal for adding support for map notes tags (Issue #5294)
Anton Khorev
notifications at github.com
Fri Dec 13 14:40:14 UTC 2024
The note versions table could look like this:
```sql
... (
note_id bigint NOT NULL,
version bigint NOT NULL,
status public.note_status_enum NOT NULL,
"timestamp" timestamp without time zone NOT NULL, -- more standard name would be created_at but that could be mixed up with the note creation timestamp
latitude integer NOT NULL,
longitude integer NOT NULL,
tile bigint NOT NULL,
user_id bigint NOT NULL, -- I guess we're not going to call this "author", that won't sound right for non-initial versions
user_ip inet, -- if we keep anonymous notes
...
)
```
We also need to choose between
```sql
visible boolean NOT NULL,
```
and
```sql
redaction_id integer
```
depending on whether we want to use redactions for hiding note version.
If we want the versions table to be similar to element versions, its primary key should be `(note_id, version)`. But that surrogate `id` from `note_comments` is useful for sorting by last update, see https://github.com/openstreetmap/openstreetmap-website/pull/4532#issuecomment-1992379385. I'd like to keep it on the versions table in addition to the comments table. Element version tables don't have it, but I'd like them have it too, see #4660, but I'm afraid of that being a migration that is too large.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5294#issuecomment-2541604426
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/5294/2541604426 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241213/50bc414b/attachment.htm>
More information about the rails-dev
mailing list