remove confusing error message when a migration is invalid

This commit is contained in:
lovasoa
2023-09-30 22:22:04 +02:00
parent e9f1beea9c
commit 2ca68a54e3
+3 -4
View File
@@ -82,10 +82,9 @@ pub async fn apply_migrations(db: &Database) -> anyhow::Result<()> {
m.description
);
}
migrator
.run(&db.connection)
.await
.with_context(|| migration_err("running the migration"))?;
migrator.run(&db.connection).await.with_context(|| {
format!("There is an error in the database migrations in {MIGRATIONS_DIR:?}")
})?;
Ok(())
}