Skip to content

Commit 2ca68a5

Browse files
committed
remove confusing error message when a migration is invalid
1 parent e9f1bee commit 2ca68a5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/webserver/database/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,9 @@ pub async fn apply_migrations(db: &Database) -> anyhow::Result<()> {
8282
m.description
8383
);
8484
}
85-
migrator
86-
.run(&db.connection)
87-
.await
88-
.with_context(|| migration_err("running the migration"))?;
85+
migrator.run(&db.connection).await.with_context(|| {
86+
format!("There is an error in the database migrations in {MIGRATIONS_DIR:?}")
87+
})?;
8988
Ok(())
9089
}
9190

0 commit comments

Comments
 (0)