From 620d4c684e2e428c71f00e348fc70fc1e9d1de12 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Thu, 6 Nov 2025 12:47:55 -0500 Subject: [PATCH] tsk-244: Remove code causing migrations to be ran twice --- src/config/init.rs | 2 +- src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/init.rs b/src/config/init.rs index c41029b..3ea950e 100644 --- a/src/config/init.rs +++ b/src/config/init.rs @@ -236,7 +236,7 @@ pub async fn app() -> axum::Router { let pool = crate::db::create_pool() .await .expect("Failed to create pool"); - // TODO: Look into handling this. Seems redundant to run migrations multiple times + crate::db::migrations(&pool).await; let cors = cors::configure_cors().await; diff --git a/src/main.rs b/src/main.rs index af168ff..d433503 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,8 +9,8 @@ async fn main() { // initialize tracing tracing_subscriber::fmt::init(); - let pool = db::create_pool().await.expect("Failed to create pool"); - db::migrations(&pool).await; + // let pool = db::create_pool().await.expect("Failed to create pool"); + // db::migrations(&pool).await; // build our application with a route let app = config::init::app().await;