[openstreetmap/openstreetmap-website] Adds non-mutable note tags support (PR #5344)

Tom Hughes notifications at github.com
Mon Feb 17 20:55:11 UTC 2025


@tomhughes commented on this pull request.



> +# Table name: note_tags
+#
+#  note_id :bigint(8)        not null, primary key
+#  k       :string           default(""), not null, primary key
+#  v       :string           default(""), not null
+#
+# Foreign Keys
+#
+#  note_tags_id_fkey  (note_id => notes.id)
+#
+
+class NoteTag < ApplicationRecord
+  belongs_to :note
+
+  validates :note, :associated => true
+  validates :k, :v, :allow_blank => true, :length => { :maximum => 255 }, :characters => true

125 changesets, 58 relations, 1300 ways (in current versions) but in any case just because we allowed silly things in the past doesn't mean we should continue to allow them in new models.

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

Message ID: <openstreetmap/openstreetmap-website/pull/5344/review/2621933196 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250217/423a0cdb/attachment.htm>


More information about the rails-dev mailing list