mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Increase sqlx version
This commit is contained in:
parent
d7f530bd6b
commit
4fcb906551
2 changed files with 2 additions and 3 deletions
|
@ -99,7 +99,7 @@ serde_with_macros = "1.4"
|
|||
aquamarine = "0.1.11"
|
||||
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",
|
||||
"sqlite",
|
||||
] }
|
||||
|
|
|
@ -40,7 +40,6 @@ impl<S> SqliteStorage<S> {
|
|||
serializer: S,
|
||||
) -> Result<Arc<Self>, SqliteStorageError<Infallible>> {
|
||||
let pool = SqlitePool::connect(format!("sqlite:{path}?mode=rwc").as_str()).await?;
|
||||
let mut conn = pool.acquire().await?;
|
||||
sqlx::query(
|
||||
"
|
||||
CREATE TABLE IF NOT EXISTS teloxide_dialogues (
|
||||
|
@ -49,7 +48,7 @@ CREATE TABLE IF NOT EXISTS teloxide_dialogues (
|
|||
);
|
||||
",
|
||||
)
|
||||
.execute(&mut conn)
|
||||
.execute(&pool)
|
||||
.await?;
|
||||
|
||||
Ok(Arc::new(Self { pool, serializer }))
|
||||
|
|
Loading…
Reference in a new issue