From a1df49555f29c3f13aae3ca91ee94211bc7360cd Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 28 Jun 2021 21:46:19 +0000 Subject: [PATCH] Insert all other SQL templates --- src/main.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 711d8b4..9e269f8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -78,7 +78,16 @@ async fn connect_sqlite(path: &PathBuf) -> sqlx::Result { #[cfg(feature = "sqlite")] async fn load_sqlite_template(sqlite_handle: &mut SqliteConnection) -> sqlx::Result { - sqlx::query(include_str!("sqlite/users.sql")).execute(sqlite_handle).await + sqlx::query(&*format!( + "{} {} {} {} {} {}", + include_str!("sqlite/users.sql"), + include_str!("sqlite/security_preferences.sql"), + include_str!("sqlite/privacy_preferences.sql"), + include_str!("sqlite/notification_preferences.sql"), + include_str!("sqlite/external_servers_privacy_preferences.sql"), + include_str!("sqlite/external_servers_preferences.sql"), + )).execute(sqlite_handle).await + } fn get_config(options: &Options) -> std::io::Result {