[openstreetmap/openstreetmap-website] Updates notes filtering to search description too (PR #5622)
Tom Hughes
notifications at github.com
Tue Feb 11 22:26:58 UTC 2025
@tomhughes requested changes on this pull request.
> @@ -0,0 +1,11 @@
+class AddTextIndexToNotes < ActiveRecord::Migration[7.2]
+ disable_ddl_transaction!
+
+ def up
+ add_index :notes, "to_tsvector('english', description)", :using => "GIN", :name => "index_notes_on_description", :algorithm => :concurrently
+ end
+
+ def down
There's no need for a separate `down` here - you get get rid of it and rename `up` as `change` and rails will figure out how to reverse things if necessary.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5622#pullrequestreview-2610211024
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5622/review/2610211024 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250211/5821427c/attachment.htm>
More information about the rails-dev
mailing list