mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-14 10:54:11 -05:00
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/621
Author: @swedishborgie
Created: 9/12/2019
Status: ✅ Merged
Merged: 9/16/2019
Merged by: @dani-garcia
Base:
master← Head:postgresql📝 Commits (1)
f5f9861Adds support for PostgreSQL which resolves #87 and is mentioned in #246.📊 Changes
18 files changed (+724 additions, -12 deletions)
View changed files
📝
Cargo.lock(+12 -0)📝
Cargo.toml(+4 -0)📝
build.rs(+6 -2)➕
docker/amd64/postgresql/Dockerfile(+103 -0)➕
docker/amd64/postgresql/Dockerfile.alpine(+85 -0)➕
migrations/postgresql/2019-09-12-100000_create_tables/down.sql(+13 -0)➕
migrations/postgresql/2019-09-12-100000_create_tables/up.sql(+121 -0)📝
src/db/mod.rs(+5 -0)📝
src/db/models/attachment.rs(+14 -2)📝
src/db/models/cipher.rs(+16 -1)📝
src/db/models/collection.rs(+48 -1)📝
src/db/models/device.rs(+13 -1)📝
src/db/models/folder.rs(+27 -1)📝
src/db/models/organization.rs(+34 -2)📝
src/db/models/two_factor.rs(+13 -1)📝
src/db/models/user.rs(+34 -1)➕
src/db/schemas/postgresql/schema.rs(+172 -0)📝
src/main.rs(+4 -0)📄 Description
The biggest change to existing code is that
replace_into()isn't supported by Diesel for the PostgreSQL back end, instead requiring the use ofon_conflict(). This unfortunately requires a branch forsave()on most of the models and requires PostgreSQL >= 9.5.I've included
Dockerfile's for amd64 for both the Debian and Alpine variants, it should be straight forward to create new files for the other architectures but I don't currently have access to the other architectures and I didn't want to submit anything untested.I've only done a couple hours worth of testing but everything seems to work. The migration SQL and model schema are both very similar to the existing two back ends.
Please let me know if you'd like any changes or if I missed anything.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.