mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 19:38:24 +00:00
index should have always been unique
This commit is contained in:
parent
00700da6b8
commit
3532957ce1
@ -0,0 +1,12 @@
|
||||
class MakeUserAuthTokenIndexUnique < ActiveRecord::Migration
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user