We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 179a2b9 commit 14972e9Copy full SHA for 14972e9
script/backfill-linked-accounts.sql
@@ -0,0 +1,7 @@
1
+INSERT INTO linked_accounts (user_id, provider, account_id, access_token, login, avatar)
2
+SELECT id, 0, gh_id, gh_access_token, gh_login, gh_avatar
3
+FROM users
4
+LEFT JOIN linked_accounts
5
+ON users.id = linked_accounts.user_id
6
+WHERE gh_id != -1
7
+AND linked_accounts.user_id IS NULL;
0 commit comments