Adds text index to description column to table notes.
#
# Indexes
#
-# notes_created_at_idx (created_at)
-# notes_tile_status_idx (tile,status)
-# notes_updated_at_idx (updated_at)
+# index_notes_on_description (to_tsvector('english'::regconfig, description)) USING gin
+# notes_created_at_idx (created_at)
+# notes_tile_status_idx (tile,status)
+# notes_updated_at_idx (updated_at)
#
# Foreign Keys
#
--- /dev/null
+class AddTextIndexToNotes < ActiveRecord::Migration[7.2]
+ disable_ddl_transaction!
+
+ def change
+ add_index :notes, "to_tsvector('english', description)", :using => "GIN", :name => "index_notes_on_description", :algorithm => :concurrently
+ end
+end
CREATE INDEX index_note_subscriptions_on_note_id ON public.note_subscriptions USING btree (note_id);
+--
+-- Name: index_notes_on_description; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_notes_on_description ON public.notes USING gin (to_tsvector('english'::regconfig, description));
+
+
--
-- Name: index_oauth_access_grants_on_application_id; Type: INDEX; Schema: public; Owner: -
--
('23'),
('22'),
('21'),
+('20250206202905'),
('20250121191749'),
('20250105154621'),
('20250104140952'),