use anyhow::Result; use sqlx::{postgres::PgPoolOptions, PgPool}; pub async fn create_pool(database_url: &str) -> Result { let pool = PgPoolOptions::new() .max_connections(10) .connect(database_url) .await?; sqlx::migrate!("src/db/migrations").run(&pool).await?; Ok(pool) }