mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[PR #6437] Use insert_into when possible #3783
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#3783
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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.