1
0
mirror of https://github.com/actix/examples synced 2025-02-02 17:39:05 +01:00

fix 'startup connection+schema check' to work on empty database (#459)

Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
sanchezroselly 2021-10-18 14:30:02 +02:00 committed by GitHub
parent 11cd3f2b58
commit e188d612c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ async fn main() -> Result<()> {
// startup connection+schema check // startup connection+schema check
sqlx::query!("SELECT * FROM todos") sqlx::query!("SELECT * FROM todos")
.fetch_one(&db_pool) .fetch_optional(&db_pool)
.await .await
.expect("no connection to database"); .expect("no connection to database");