Fix issue when migrating an empty database
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class RemoveEventIndices < ActiveRecord::Migration[4.2]
|
||||
class RemoveEventIndices < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
remove_index :events, %i[user_type user_id]
|
||||
remove_index :events, :exercise_id
|
||||
remove_index :events, :file_id
|
||||
remove_index :events, %i[user_type user_id], if_exists: true
|
||||
remove_index :events, :exercise_id, if_exists: true
|
||||
remove_index :events, :file_id, if_exists: true
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user