diff --git a/crates/store/src/sqlite_store.rs b/crates/store/src/sqlite_store.rs index 354b1aa..e2a51c7 100644 --- a/crates/store/src/sqlite_store.rs +++ b/crates/store/src/sqlite_store.rs @@ -112,7 +112,7 @@ impl CalendarStore for SqliteCalendarStore { } } -pub async fn create_db_pool(db_url: &str, migrate: bool) -> anyhow::Result>{ +pub async fn create_db_pool(db_url: &str, migrate: bool) -> anyhow::Result> { let db = SqlitePool::connect_with( SqliteConnectOptions::new() .filename(db_url) @@ -124,4 +124,10 @@ pub async fn create_db_pool(db_url: &str, migrate: bool) -> anyhow::Result anyhow::Result { + let db = SqlitePool::connect("sqlite::memory:").await?; + sqlx::migrate!("./migrations").run(&db).await?; + Ok(SqliteCalendarStore::new(db)) +}