mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +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"
|
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",
|
||||||
] }
|
] }
|
||||||
|
|
|
@ -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 }))
|
||||||
|
|
Loading…
Reference in a new issue