-
Notifications
You must be signed in to change notification settings - Fork 934
fix: use unique ID for linked accounts #3441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
305f696
b4ab301
dd2df9c
0356f46
6b1b900
8f63d5c
de7db33
5fdf899
3a4d049
4108ece
14b5382
8553501
f748d3d
c1b9871
e41c103
bb9b777
d940dae
c97d572
10bfe77
28a37f1
c889bf0
0196a49
b5dc95b
f2f76e9
940ced4
eb266db
4671bf6
c41f4e6
f3d8392
cc8400b
5c7cbae
083d256
92c185d
05595d8
aa90148
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE users DROP COLUMN linked_id; | ||
ALTER TABLE users DROP COLUMN login_type; | ||
|
||
COMMIT; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE users ADD COLUMN login_type login_type NOT NULL DEFAULT 'password'; | ||
ALTER TABLE users ADD COLUMN linked_id text NOT NULL DEFAULT ''; | ||
|
||
UPDATE | ||
users | ||
SET | ||
login_type = ( | ||
SELECT | ||
login_type | ||
FROM | ||
api_keys | ||
WHERE | ||
api_keys.user_id = users.id | ||
ORDER BY updated_at DESC | ||
LIMIT 1 | ||
); | ||
|
||
COMMIT; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.