mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 02:11:08 -06:00
13 lines
384 B
Ruby
13 lines
384 B
Ruby
class MakeUserAuthTokenIndexUnique < ActiveRecord::Migration[4.2]
|
|
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
|