mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
* Add scaffolding * Move migration * Add endpoints for gitauth * Add configuration files and tests! * Update typesgen * Convert configuration format for git auth * Fix unclosed database conn * Add overriding VS Code configuration * Fix Git screen * Write VS Code special configuration if providers exist * Enable automatic cloning from VS Code * Add tests for gitaskpass * Fix feature visibiliy * Add banner for too many configurations * Fix update loop for oauth token * Jon comments * Add deployment config page
30 lines
573 B
SQL
30 lines
573 B
SQL
-- name: GetGitAuthLink :one
|
|
SELECT * FROM git_auth_links WHERE provider_id = $1 AND user_id = $2;
|
|
|
|
-- name: InsertGitAuthLink :one
|
|
INSERT INTO git_auth_links (
|
|
provider_id,
|
|
user_id,
|
|
created_at,
|
|
updated_at,
|
|
oauth_access_token,
|
|
oauth_refresh_token,
|
|
oauth_expiry
|
|
) VALUES (
|
|
$1,
|
|
$2,
|
|
$3,
|
|
$4,
|
|
$5,
|
|
$6,
|
|
$7
|
|
) RETURNING *;
|
|
|
|
-- name: UpdateGitAuthLink :exec
|
|
UPDATE git_auth_links SET
|
|
updated_at = $3,
|
|
oauth_access_token = $4,
|
|
oauth_refresh_token = $5,
|
|
oauth_expiry = $6
|
|
WHERE provider_id = $1 AND user_id = $2;
|