chore: fix migration miss (#321)

This commit is contained in:
Nathan.fooo 2024-02-18 17:38:14 +08:00 committed by GitHub
parent 05c1b7b2db
commit 44d2a6809f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -355,6 +355,7 @@ async fn get_connection_pool(setting: &DatabaseSetting) -> Result<PgPool, Error>
async fn migrate(pool: &PgPool) -> Result<(), Error> {
sqlx::migrate!("./migrations")
.set_ignore_missing(true)
.run(pool)
.await
.map_err(|e| anyhow::anyhow!("Failed to run migrations: {}", e))