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 3a4d049 commit 4108eceCopy full SHA for 4108ece
coderd/database/migrations/000034_linked_user_id.up.sql
@@ -1,6 +1,15 @@
1
BEGIN;
2
3
-ALTER TABLE users ADD COLUMN login_type login_type NOT NULL DEFAULT 'password';
+CREATE TABLE IF NOT EXISTS users (
4
+ user_id uuid NOT NULL,
5
+ login_type login_type NOT NULL,
6
+ linked_id text NOT NULL DEFAULT ''::text NOT NULL,
7
+ oauth_access_token text DEFAULT ''::text NOT NULL,
8
+ oauth_refresh_token text DEFAULT ''::text NOT NULL,
9
+ oauth_id_token text DEFAULT ''::text NOT NULL,
10
+ oauth_expiry timestamp with time zone DEFAULT '0001-01-01 00:00:00+00'::timestamp with time zone NOT NULL,
11
+ UNIQUE(user_id, login_type),
12
+)
13
ALTER TABLE users ADD COLUMN linked_id text NOT NULL DEFAULT '';
14
15
UPDATE
0 commit comments