From 71498256f6dc91e9b70f35c3c0bd0867a1f7a82b Mon Sep 17 00:00:00 2001 From: Tobias Reisinger <tobias@msrg.cc> Date: Mon, 29 Apr 2024 02:09:29 +0200 Subject: [PATCH] Update sqlx handling --- .env.example | 4 +- ...a7a37ef509f50954509557ec985c996960da2.json | 44 +++++++++++++++++++ emgauwa-core/build.rs | 2 - emgauwa-lib/build.rs | 1 - 4 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 .sqlx/query-772c710d542c7f5aaa49069fe12a7a37ef509f50954509557ec985c996960da2.json diff --git a/.env.example b/.env.example index d3e5feb..fb629ae 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,3 @@ -DATABASE_URL=sqlite://emgauwa-dev.sqlite - #EMGAUWA_CONTROLLER_LOGGING_LEVEL=INFO -#EMGAUWA_CORE_LOGGING_LEVEL=INFO \ No newline at end of file +#EMGAUWA_CORE_LOGGING_LEVEL=INFO diff --git a/.sqlx/query-772c710d542c7f5aaa49069fe12a7a37ef509f50954509557ec985c996960da2.json b/.sqlx/query-772c710d542c7f5aaa49069fe12a7a37ef509f50954509557ec985c996960da2.json new file mode 100644 index 0000000..6915ce7 --- /dev/null +++ b/.sqlx/query-772c710d542c7f5aaa49069fe12a7a37ef509f50954509557ec985c996960da2.json @@ -0,0 +1,44 @@ +{ + "db_name": "SQLite", + "query": "SELECT * FROM macro_actions WHERE macro_id = ? AND weekday = ?", + "describe": { + "columns": [ + { + "name": "id", + "ordinal": 0, + "type_info": "Int64" + }, + { + "name": "macro_id", + "ordinal": 1, + "type_info": "Int64" + }, + { + "name": "relay_id", + "ordinal": 2, + "type_info": "Int64" + }, + { + "name": "schedule_id", + "ordinal": 3, + "type_info": "Int64" + }, + { + "name": "weekday", + "ordinal": 4, + "type_info": "Int64" + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false, + false, + false, + false, + false + ] + }, + "hash": "772c710d542c7f5aaa49069fe12a7a37ef509f50954509557ec985c996960da2" +} diff --git a/emgauwa-core/build.rs b/emgauwa-core/build.rs index 443df4c..27e067f 100644 --- a/emgauwa-core/build.rs +++ b/emgauwa-core/build.rs @@ -1,8 +1,6 @@ use std::process::{exit, Command}; fn main() { - println!("cargo:rustc-env=DATABASE_URL=sqlite://emgauwa-core.sqlite"); - println!("cargo:rerun-if-changed=../api.v1.yaml"); let output = Command::new("sh") .arg("-c") diff --git a/emgauwa-lib/build.rs b/emgauwa-lib/build.rs index 65d8d11..827c260 100644 --- a/emgauwa-lib/build.rs +++ b/emgauwa-lib/build.rs @@ -1,4 +1,3 @@ fn main() { println!("cargo:rerun-if-changed=migrations"); - println!("cargo:rustc-env=DATABASE_URL=sqlite://emgauwa-dev.sqlite"); }