mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore(db): remove 23 unused database methods (#22999)
Removes 22 database query methods with no callers outside generated code and the dbauthz wrapper layer (~1,600 lines). **Security keys (6)** — superseded by `cryptokeys` package: `GetAppSecurityKey`, `UpsertAppSecurityKey`, `GetOAuthSigningKey`, `UpsertOAuthSigningKey`, `GetCoordinatorResumeTokenSigningKey`, `UpsertCoordinatorResumeTokenSigningKey` **Superseded queries (4):** - `GetProvisionerJobsByIDs` → `GetProvisionerJobsByIDsWithQueuePosition` - `GetDeploymentDAUs` / `GetTemplateDAUs` → `GetTemplateInsightsByInterval` - `GetWorkspaceBuildParametersByBuildIDs` + its `GetAuthorized...` variant → unused **OAuth2 (2):** `GetOAuth2ProviderAppByRegistrationToken`, `UpdateOAuth2ProviderAppSecretByID` **Chat (4)** — pre-wired with no callers: `GetChatModelConfigByProviderAndModel`, `DeleteChatMessagesByChatID`, `ListChatsByRootID`, `ListChildChatsByParentID` **Other (6):** `DeleteGitSSHKey`, `UpdateUserLinkedID`, `GetFileIDByTemplateVersionID`, `GetTemplateVersionHasAITask`, `InsertUserGroupsByName`, `RemoveUserFromAllGroups`
This commit is contained in:
@@ -8,22 +8,6 @@ WHERE
|
||||
LIMIT
|
||||
1;
|
||||
|
||||
-- name: GetFileIDByTemplateVersionID :one
|
||||
SELECT
|
||||
files.id
|
||||
FROM
|
||||
files
|
||||
JOIN
|
||||
provisioner_jobs ON
|
||||
provisioner_jobs.storage_method = 'file'
|
||||
AND provisioner_jobs.file_id = files.id
|
||||
JOIN
|
||||
template_versions ON template_versions.job_id = provisioner_jobs.id
|
||||
WHERE
|
||||
template_versions.id = @template_version_id
|
||||
LIMIT
|
||||
1;
|
||||
|
||||
|
||||
-- name: GetFileByHashAndCreator :one
|
||||
SELECT
|
||||
|
||||
Reference in New Issue
Block a user