From 503a1b98b4d568f432776564009d644a7545b9b7 Mon Sep 17 00:00:00 2001 From: phoenix Date: Sat, 2 Aug 2025 16:58:05 -0400 Subject: [PATCH] tsk-50: Using migrations from db module --- src/main.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/main.rs b/src/main.rs index fdb4495..c798f1f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -112,15 +112,6 @@ mod tests { Ok(()) } - pub async fn migrations(pool: &sqlx::PgPool) { - // Run migrations using the sqlx::migrate! macro - // Assumes your migrations are in a ./migrations folder relative to Cargo.toml - sqlx::migrate!("./test_migrations") - .run(pool) - .await - .expect("Failed to run migrations"); - } - pub async fn get_database_name() -> Result> { let database_url = icarus_envy::environment::get_db_url().await; @@ -203,7 +194,7 @@ mod tests { let pool = db_mgr::connect_to_db(&db_name).await.unwrap(); - db_mgr::migrations(&pool).await; + icarus_auth::db::migrations(&pool).await; let app = init::routes().await.layer(axum::Extension(pool)); @@ -287,7 +278,7 @@ mod tests { let pool = db_mgr::connect_to_db(&db_name).await.unwrap(); - db_mgr::migrations(&pool).await; + icarus_auth::db::migrations(&pool).await; let app = init::routes().await.layer(axum::Extension(pool));