]> git.openstreetmap.org Git - rails.git/blob - db/migrate/20250304172798_add_notes_user_id_created_at_index.rb
add note table user_id, created_at index for non-anonymus notes
[rails.git] / db / migrate / 20250304172798_add_notes_user_id_created_at_index.rb
1 class AddNotesUserIdCreatedAtIndex < ActiveRecord::Migration[7.2]
2   disable_ddl_transaction!
3
4   def change
5     add_index :notes, [:user_id, :created_at],
6               :algorithm => :concurrently,
7               :where => "user_id IS NOT NULL"
8   end
9 end