mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-09 04:32:44 -05:00
[PR #6437] Use insert_into when possible #7415
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/6437
Author: @Timshel
Created: 11/5/2025
Status: 🔄 Open
Base:
main← Head:upsert📝 Commits (1)
a576a51Use insert_into when possible📊 Changes
13 files changed (+171 additions, -321 deletions)
View changed files
📝
src/api/core/accounts.rs(+1 -1)📝
src/db/models/attachment.rs(+7 -15)📝
src/db/models/auth_request.rs(+11 -19)📝
src/db/models/cipher.rs(+7 -15)📝
src/db/models/collection.rs(+30 -62)📝
src/db/models/device.rs(+6 -3)📝
src/db/models/emergency_access.rs(+7 -15)📝
src/db/models/event.rs(+15 -12)📝
src/db/models/folder.rs(+12 -21)📝
src/db/models/group.rs(+39 -88)📝
src/db/models/organization.rs(+21 -47)📝
src/db/models/send.rs(+7 -15)📝
src/db/models/user.rs(+8 -8)📄 Description
Replace most
replace_intowithinsert_intoto avoid deleting a record to update it.There is still two left :
But changing those would be more complex, the composite key could be used as primary instead of an
uuid.But at least for the
OrgPolicytheuuidappears to be used when logging an event.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.