Insert all other SQL templates

This commit is contained in:
Erik Foris 2021-06-28 21:46:19 +00:00
parent c42fbebe09
commit a1df49555f

View File

@ -78,7 +78,16 @@ async fn connect_sqlite(path: &PathBuf) -> sqlx::Result<SqliteConnection> {
#[cfg(feature = "sqlite")]
async fn load_sqlite_template(sqlite_handle: &mut SqliteConnection) -> sqlx::Result<SqliteQueryResult> {
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<Config> {