dawarich/db/migrate/20250810110943_add_index_to_points_tracker_id.rb

14 lines
375 B
Ruby

class AddIndexToPointsTrackerId < ActiveRecord::Migration[8.0]
disable_ddl_transaction!
def up
add_index :points, :tracker_id,
name: "index_points_on_tracker_id",
algorithm: :concurrently,
if_not_exists: true
end
def down
remove_index :points, name: "index_points_on_tracker_id", algorithm: :concurrently
end
end