tsk-244: Remove code causing migrations to be ran twice #246
+1
-1
@@ -236,7 +236,7 @@ pub async fn app() -> axum::Router {
|
|||||||
let pool = crate::db::create_pool()
|
let pool = crate::db::create_pool()
|
||||||
.await
|
.await
|
||||||
.expect("Failed to create pool");
|
.expect("Failed to create pool");
|
||||||
// TODO: Look into handling this. Seems redundant to run migrations multiple times
|
|
||||||
crate::db::migrations(&pool).await;
|
crate::db::migrations(&pool).await;
|
||||||
|
|
||||||
let cors = cors::configure_cors().await;
|
let cors = cors::configure_cors().await;
|
||||||
|
|||||||
+2
-2
@@ -9,8 +9,8 @@ async fn main() {
|
|||||||
// initialize tracing
|
// initialize tracing
|
||||||
tracing_subscriber::fmt::init();
|
tracing_subscriber::fmt::init();
|
||||||
|
|
||||||
let pool = db::create_pool().await.expect("Failed to create pool");
|
// let pool = db::create_pool().await.expect("Failed to create pool");
|
||||||
db::migrations(&pool).await;
|
// db::migrations(&pool).await;
|
||||||
|
|
||||||
// build our application with a route
|
// build our application with a route
|
||||||
let app = config::init::app().await;
|
let app = config::init::app().await;
|
||||||
|
|||||||
Reference in New Issue
Block a user