[index] Add index on polls id and lock_version
This commit is contained in:
7
db/migrate/20210117210100_add_index_on_polls.rb
Normal file
7
db/migrate/20210117210100_add_index_on_polls.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class AddIndexOnPolls < ActiveRecord::Migration[5.2]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_index :polls, [:id, :lock_version], algorithm: :concurrently
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user