//! Database access. Connection comes from `ops_core::sqlite`; migrations are //! per-crate (the `sqlx::migrate!` path is compile-time, relative to here). use anyhow::Result; use sqlx::SqlitePool; use std::path::Path; pub use ops_core::sqlite::connect; pub async fn open(path: &Path) -> Result { let pool = connect(path).await?; sqlx::migrate!("./migrations").run(&pool).await?; Ok(pool) }