aboutsummaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorMichael Powers <[email protected]>2019-09-12 16:12:22 -0400
committerMichael Powers <[email protected]>2019-09-12 16:12:22 -0400
commitf5f9861a78c1a4b6322e27739e7886d8d0f15759 (patch)
treed938e44eb9b946a52c8b0de549dcdc8fa33d286d /build.rs
parentf9408a00c6dbbf28ac9b29b0e7ee8f04bc76925c (diff)
downloadvaultwarden-f5f9861a78c1a4b6322e27739e7886d8d0f15759.tar.gz
vaultwarden-f5f9861a78c1a4b6322e27739e7886d8d0f15759.zip
Adds support for PostgreSQL which resolves #87 and is mentioned in #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.
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/build.rs b/build.rs
index e950653d..ac92dbd9 100644
--- a/build.rs
+++ b/build.rs
@@ -2,9 +2,13 @@ use std::process::Command;
fn main() {
#[cfg(all(feature = "sqlite", feature = "mysql"))]
- compile_error!("Can't enable both backends");
+ compile_error!("Can't enable both sqlite and mysql at the same time");
+ #[cfg(all(feature = "sqlite", feature = "postgresql"))]
+ compile_error!("Can't enable both sqlite and postgresql at the same time");
+ #[cfg(all(feature = "mysql", feature = "postgresql"))]
+ compile_error!("Can't enable both mysql and postgresql at the same time");
- #[cfg(not(any(feature = "sqlite", feature = "mysql")))]
+ #[cfg(not(any(feature = "sqlite", feature = "mysql", feature = "postgresql")))]
compile_error!("You need to enable one DB backend. To build with previous defaults do: cargo build --features sqlite");
read_git_info().ok();