-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This removes the group information from entities in favor of relying on providers for data integrity.
- Loading branch information
Showing
32 changed files
with
397 additions
and
440 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
-- name: CreateAccessToken :one | ||
INSERT INTO provider_access_tokens (group_id, provider_id, encrypted_token, expiration_time, owner_filter) VALUES ($1, $2, $3, $4, $5) RETURNING *; | ||
INSERT INTO provider_access_tokens (provider_id, encrypted_token, expiration_time, owner_filter) VALUES ($1, $2, $3, $4) RETURNING *; | ||
|
||
-- name: GetAccessTokenByGroupID :one | ||
SELECT * FROM provider_access_tokens WHERE provider_id = $1 AND group_id = $2; | ||
-- name: GetAccessTokenByProviderID :one | ||
SELECT * FROM provider_access_tokens WHERE provider_id = $1; | ||
|
||
-- name: UpdateAccessToken :one | ||
UPDATE provider_access_tokens SET encrypted_token = $3, expiration_time = $4, owner_filter = $5, updated_at = NOW() WHERE provider_id = $1 AND group_id = $2 RETURNING *; | ||
UPDATE provider_access_tokens SET encrypted_token = $2, expiration_time = $3, owner_filter = $4, updated_at = NOW() WHERE provider_id = $1 RETURNING *; | ||
|
||
-- name: DeleteAccessToken :exec | ||
DELETE FROM provider_access_tokens WHERE provider_id = $1 AND group_id = $2; | ||
DELETE FROM provider_access_tokens WHERE provider_id = $1; | ||
|
||
-- name: GetAccessTokenByProvider :many | ||
SELECT * FROM provider_access_tokens WHERE provider_id = $1; | ||
|
||
-- name: GetAccessTokenSinceDate :one | ||
SELECT * FROM provider_access_tokens WHERE provider_id = $1 AND group_id = $2 AND created_at >= $3; | ||
SELECT * FROM provider_access_tokens WHERE provider_id = $1 AND created_at >= $2; |
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
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
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
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
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
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
Oops, something went wrong.