Register endpoint #16
@@ -37,6 +37,13 @@ async fn app() -> Router {
|
|||||||
.await
|
.await
|
||||||
.expect("Failed to create pool");
|
.expect("Failed to create pool");
|
||||||
|
|
||||||
|
// Run migrations using the sqlx::migrate! macro
|
||||||
|
// Assumes your migrations are in a ./migrations folder relative to Cargo.toml
|
||||||
|
sqlx::migrate!("./migrations")
|
||||||
|
.run(&pool)
|
||||||
|
.await
|
||||||
|
.expect("Failed to run migrations on testcontainer DB");
|
||||||
|
|
||||||
routes().await.layer(axum::Extension(pool))
|
routes().await.layer(axum::Extension(pool))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user