diff --git a/Cargo.toml b/Cargo.toml index d32d81a..ef8d3fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,4 +18,5 @@ dotenv = "0.15.0" chrono = "0.4.24" paho-mqtt = "0.12.1" serde = "1.0.162" -serde_json = { version = "1.0.95" } \ No newline at end of file +serde_json = { version = "1.0.95" } +diesel = { version = "2.1.0", features = ["postgres", "extras"] } diff --git a/kairo-common/Cargo.toml b/kairo-common/Cargo.toml index 213b17c..9556c19 100644 --- a/kairo-common/Cargo.toml +++ b/kairo-common/Cargo.toml @@ -14,11 +14,11 @@ dotenv = { workspace = true } chrono = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } +diesel = { workspace = true } + influxdb2 = "0.4.2" influxdb2-structmap = "0.2" influxdb2-derive = "0.1.1" futures = "0.3.28" num-traits = "0.2" -diesel = { version = "2.1.0", features = ["postgres"] } -diesel-async = { version = "0.3.1", features = ["postgres"] } diff --git a/kairo-common/src/lib.rs b/kairo-common/src/lib.rs index ed439b7..0610a16 100644 --- a/kairo-common/src/lib.rs +++ b/kairo-common/src/lib.rs @@ -20,7 +20,7 @@ pub type Point = types::point::Point; pub type MAC = types::mac::MAC; // DB models: for SQL with Diesel and InfluxDB and influxdb-derive -mod schema; +pub mod schema; mod models { pub mod antenna; pub mod beacon_measure; diff --git a/kairo-core/Cargo.toml b/kairo-core/Cargo.toml index c7449b1..c86cad7 100644 --- a/kairo-core/Cargo.toml +++ b/kairo-core/Cargo.toml @@ -6,3 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +diesel = { workspace = true} + +rocket = { version = "0.5.0-rc.3", features = ["json"] } +kairo-common = { path = "../kairo-common" } \ No newline at end of file