2017-08-31 00:06:56 -04:00
|
|
|
class MakeUserAuthTokenIndexUnique < ActiveRecord::Migration[4.2]
|
2017-02-22 12:34:40 -05:00
|
|
|
def up
|
|
|
|
remove_index :user_auth_tokens, [:auth_token]
|
|
|
|
remove_index :user_auth_tokens, [:prev_auth_token]
|
|
|
|
add_index :user_auth_tokens, [:auth_token], unique: true
|
|
|
|
add_index :user_auth_tokens, [:prev_auth_token], unique: true
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
# no op, this should always have been unique
|
|
|
|
end
|
|
|
|
end
|