Increase sqlx version

This commit is contained in:
Сырцев Вадим Игоревич 2024-01-15 19:28:56 +03:00
parent d7f530bd6b
commit 4fcb906551
2 changed files with 2 additions and 3 deletions

View file

@ -99,7 +99,7 @@ serde_with_macros = "1.4"
aquamarine = "0.1.11" aquamarine = "0.1.11"
either = "1.9.0" either = "1.9.0"
sqlx = { version = "0.6", optional = true, default-features = false, features = [ sqlx = { version = "0.7.3", optional = true, default-features = false, features = [
"macros", "macros",
"sqlite", "sqlite",
] } ] }

View file

@ -40,7 +40,6 @@ impl<S> SqliteStorage<S> {
serializer: S, serializer: S,
) -> Result<Arc<Self>, SqliteStorageError<Infallible>> { ) -> Result<Arc<Self>, SqliteStorageError<Infallible>> {
let pool = SqlitePool::connect(format!("sqlite:{path}?mode=rwc").as_str()).await?; let pool = SqlitePool::connect(format!("sqlite:{path}?mode=rwc").as_str()).await?;
let mut conn = pool.acquire().await?;
sqlx::query( sqlx::query(
" "
CREATE TABLE IF NOT EXISTS teloxide_dialogues ( CREATE TABLE IF NOT EXISTS teloxide_dialogues (
@ -49,7 +48,7 @@ CREATE TABLE IF NOT EXISTS teloxide_dialogues (
); );
", ",
) )
.execute(&mut conn) .execute(&pool)
.await?; .await?;
Ok(Arc::new(Self { pool, serializer })) Ok(Arc::new(Self { pool, serializer }))