Files
grecia/db/migrate/20171002103314_add_poll_shift_task_index.rb
Javi Martín 3865225e98 Make migrations using remove_index reversible
These issues were detected after upgrading to rubocop-rails >= 2.8.0.
2021-08-09 23:53:21 +02:00

8 lines
255 B
Ruby

class AddPollShiftTaskIndex < ActiveRecord::Migration[4.2]
def change
remove_index "poll_shifts", column: [:booth_id, :officer_id]
add_index :poll_shifts, :task
add_index :poll_shifts, [:booth_id, :officer_id, :task], unique: true
end
end