Update the sqlx dependency

This commit is contained in:
Rodolphe Bréard 2023-09-20 19:18:13 +02:00
parent 667016c480
commit c1a12a081b
3 changed files with 4 additions and 9 deletions

View file

@ -8,11 +8,6 @@ jobs:
strategy:
matrix:
rust:
- 1.65.0
- 1.66.1
- 1.67.1
- 1.68.1
- 1.69.0
- 1.70.0
- 1.71.1
- 1.72.1

View file

@ -19,6 +19,6 @@ nom = { version = "7.1.3", default-features = false }
rand = { version = "0.8.5", default-features = false }
rsa = { version = "0.9.0", default-features = false, features = ["sha2", "std"] }
sha2 = { version = "0.10.6", default-features = false, features = ["asm"] }
sqlx = { version = "0.6.3", default-features = false, features = ["runtime-tokio-native-tls", "macros", "migrate", "sqlite", "time"] }
sqlx = { version = "0.7.1", default-features = false, features = ["runtime-tokio-native-tls", "macros", "migrate", "sqlite", "time"] }
tokio = { version = "1.27.0", default-features = false, features = ["rt-multi-thread", "io-std", "io-util", "macros", "sync", "time", "process"] }
uuid = { version = "1.3.1", default-features = false, features = ["v4", "fast-rng"] }

View file

@ -59,10 +59,10 @@ WHERE
AND algorithm = $3";
pub async fn init(cnf: &Config) -> Result<SqlitePool> {
let mut db_options = SqliteConnectOptions::new()
let db_options = SqliteConnectOptions::new()
.filename(cnf.key_data_base())
.create_if_missing(true);
db_options.log_statements(log::LevelFilter::Trace);
.create_if_missing(true)
.log_statements(log::LevelFilter::Trace);
let db_pool = SqlitePoolOptions::new().connect_with(db_options).await?;
sqlx::migrate!().run(&db_pool).await?;
Ok(db_pool)