Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use postgresql database #87

Closed
rzig opened this issue Jul 15, 2018 · 5 comments
Closed

Use postgresql database #87

rzig opened this issue Jul 15, 2018 · 5 comments
Labels
enhancement New feature or request low priority Won't fix anytime soon, but will accept PR if provided

Comments

@rzig
Copy link

rzig commented Jul 15, 2018

Hi! Would it be possible to add support for PostgreSQL? I'd like to use a database independent of the docker container.

@mprasil
Copy link
Contributor

mprasil commented Jul 15, 2018

It's definitely possible - diesel that's used as ORM layer does support Postgres, however it's not an easy task to do that. Having DB backed swap-able in place is not goal of diesel and hence you need some work around this.

Having said that I don't think we use SQL directly outside of the migrations code, so if someone is motivated enough to dive into the code to do that, patches would be welcome.

@mprasil mprasil added the enhancement New feature or request label Jul 15, 2018
@mprasil
Copy link
Contributor

mprasil commented Aug 10, 2018

Note that we're using replace_into a lot. It appears, that this might not be supported with Postgres.

@mprasil mprasil added the low priority Won't fix anytime soon, but will accept PR if provided label Aug 11, 2018
@jgrip
Copy link

jgrip commented Sep 27, 2018

Upserts were added in 9.5, so this is supported on version 9.5 and up.
http://www.postgresqltutorial.com/postgresql-upsert/

Not looked at the bw_rs code to see how much work it would be yet.

@odarriba
Copy link

odarriba commented Nov 4, 2018

It would be very helpful tonbe able to deploy bw_rs in Kubernetes and ease the backup of the files! Also running multiple nodes without direct file sharing

@dani-garcia
Copy link
Owner

To keep the issue tracker more focused, I'm closing this issue in favor of the meta issue at #246.

@endyman endyman mentioned this issue May 28, 2019
5 tasks
dani-garcia added a commit that referenced this issue Sep 16, 2019
Adds support for PostgreSQL which adds #87 and is mentioned in #246.
thelittlefireman pushed a commit to thelittlefireman/bitwarden_rs that referenced this issue Mar 19, 2021
…ioned in dani-garcia#246.

This includes migrations as well as Dockerfile's for amd64.

The biggest change is that replace_into isn't supported by Diesel for the
PostgreSQL backend, instead requiring the use of on_conflict. This
unfortunately requires a branch for save() on all of the models currently
using replace_into.
thelittlefireman pushed a commit to thelittlefireman/bitwarden_rs that referenced this issue Mar 19, 2021
Adds support for PostgreSQL which adds dani-garcia#87 and is mentioned in dani-garcia#246.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority Won't fix anytime soon, but will accept PR if provided
Projects
None yet
Development

No branches or pull requests

5 participants