mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 07:36:09 +08:00
FIX: updated_at
needs to be set in migration as well.
This commit is contained in:
parent
705f75dd8c
commit
7a4aee4a7e
|
@ -28,9 +28,9 @@ SQL
|
||||||
add_index :user_auth_tokens, [:auth_token]
|
add_index :user_auth_tokens, [:auth_token]
|
||||||
add_index :user_auth_tokens, [:prev_auth_token]
|
add_index :user_auth_tokens, [:prev_auth_token]
|
||||||
|
|
||||||
execute <<SQL
|
execute <<~SQL
|
||||||
INSERT INTO user_auth_tokens(user_id, auth_token, prev_auth_token, legacy, created_at, rotated_at)
|
INSERT INTO user_auth_tokens(user_id, auth_token, prev_auth_token, legacy, updated_at, created_at, rotated_at)
|
||||||
SELECT id, auth_token, auth_token, true, auth_token_updated_at, auth_token_updated_at
|
SELECT id, auth_token, auth_token, true, auth_token_updated_at, auth_token_updated_at, auth_token_updated_at
|
||||||
FROM users
|
FROM users
|
||||||
WHERE auth_token_updated_at IS NOT NULL AND auth_token IS NOT NULL
|
WHERE auth_token_updated_at IS NOT NULL AND auth_token IS NOT NULL
|
||||||
SQL
|
SQL
|
||||||
|
|
Loading…
Reference in New Issue
Block a user