Last active
January 2, 2016 21:39
-
-
Save metaodi/8364558 to your computer and use it in GitHub Desktop.
Copy values from one kort user to another to move a user to another OAuth provider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE kort.user | |
SET name = sub.name, | |
username = sub.username, | |
koin_count = sub.koin_count, | |
token = sub.token, | |
oauth_provider = sub.oauth_provider, | |
oauth_user_id = sub.oauth_user_id, | |
pic_url = sub.pic_url, | |
secret = sub.secret | |
FROM (SELECT name, username, koin_count, token, oauth_provider, oauth_user_id, pic_url, secret | |
FROM kort.user | |
WHERE user_id = <user id to copy>) as sub | |
WHERE user_id = <user id to change>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment