#
# Indexes
#
-# index_user_blocks_on_user_id (user_id)
+# index_user_blocks_on_creator_id_and_id (creator_id,id)
+# index_user_blocks_on_user_id (user_id)
#
# Foreign Keys
#
--- /dev/null
+class AddCreatorIndexToUserBlocks < ActiveRecord::Migration[7.1]
+ disable_ddl_transaction!
+
+ def change
+ add_index :user_blocks, [:creator_id, :id], :algorithm => :concurrently
+ end
+end
CREATE INDEX index_reports_on_user_id ON public.reports USING btree (user_id);
+--
+-- Name: index_user_blocks_on_creator_id_and_id; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_user_blocks_on_creator_id_and_id ON public.user_blocks USING btree (creator_id, id);
+
+
--
-- Name: index_user_blocks_on_user_id; Type: INDEX; Schema: public; Owner: -
--
('23'),
('22'),
('21'),
+('20240405083825'),
('20240307181018'),
('20240307180830'),
('20240228205723'),