use sqlx::sqlite::SqlitePool; pub async fn init(url: &str) -> SqlitePool { let pool = SqlitePool::connect(url) .await .expect("error while connecting to db"); sqlx::migrate!() .run(&pool) .await .expect("error in migrations"); log::info!("Connected to postgres"); pool }