forgejo/routers/api/packages/nuget
Gusted fc9db11c56 feat: avoid updating all columns (#9572)
This patch contains two fixes/enhancements to two functions that were updating all columns of the `access_token` and `repository` table when they were only updating a select few columns. Within Codeberg we saw these two queries quite often when something problematic with the database was going on, likely because of this all columns update pattern. `UpdateAccessToken` is removed and a new function `UpdateLastUsed` was added, for `updateRepoRunsNumbers` we can simply add which columns we want to have updated in that query.

It's likely there are more of such queries, but these were the ones being executed often.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9572
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-10-09 13:22:29 +02:00
..
api_v2.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
api_v3.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
auth.go feat: avoid updating all columns (#9572) 2025-10-09 13:22:29 +02:00
links.go Fix handling of plenty Nuget package versions (#26075) 2023-07-26 19:43:21 +00:00
nuget.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00