Added config file for db #9

Merged
phoenix merged 32 commits from db into devel 2025-04-03 13:59:56 +00:00
2 changed files with 12 additions and 0 deletions
Showing only changes of commit 4fc15810f4 - Show all commits

View File

@@ -0,0 +1 @@
-- Add migration script here

View File

@@ -35,15 +35,26 @@ async fn setup_database() -> sqlx::PgPool {
.await
.expect("Failed to connect to test database");
/*
let migrator = sqlx::migrate::Migrator::new(std::path::Path::new("./migrations"))
.await
.expect("Failed to create migrator");
migrator.run(&pool).await.expect("Failed to run migrations");
*/
// Seed here if needed
pool
}
#[tokio::test]
async fn test_db_health() {
SETUP.call_once(|| {
tokio::runtime::Runtime::new().unwrap().block_on(async {
setup_database().await;
});
});
}
/*
async fn setup_test(pool: sqlx::PgPool) -> Router {
Router::new()