Insert all other SQL templates
This commit is contained in:
parent
c42fbebe09
commit
a1df49555f
11
src/main.rs
11
src/main.rs
@ -78,7 +78,16 @@ async fn connect_sqlite(path: &PathBuf) -> sqlx::Result<SqliteConnection> {
|
|||||||
|
|
||||||
#[cfg(feature = "sqlite")]
|
#[cfg(feature = "sqlite")]
|
||||||
async fn load_sqlite_template(sqlite_handle: &mut SqliteConnection) -> sqlx::Result<SqliteQueryResult> {
|
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> {
|
fn get_config(options: &Options) -> std::io::Result<Config> {
|
||||||
|
Loading…
Reference in New Issue
Block a user