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

Emin Kocan notifications at github.com
Tue Dec 3 22:35:35 UTC 2024


@kcne commented on this pull request.



> +class CreateNoteTags < ActiveRecord::Migration[7.2]
+  def change
+    # Create a table and primary key
+    create_table :note_tags, :primary_key => [:note_id, :k] do |t|
+      t.column "note_id", :bigint, :null => false
+      t.column "k",  :string, :default => "", :null => false
+      t.column "v",  :string, :default => "", :null => false
+
+      t.foreign_key :notes, :column => :note_id, :name => "note_tags_id_fkey"
+    end
+  end
+end

I misunderstood the use case, you are right it doesn't. Adding the index on k and v would do.. I will edit the top comment for more clarity

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

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


More information about the rails-dev mailing list