db: refresh_sessions migration + SQLite/Postgres adapters

This commit is contained in:
2026-06-11 14:31:46 +02:00
parent ef9ecbae06
commit 3a3f3b3889
8 changed files with 255 additions and 4 deletions

View File

@@ -79,7 +79,7 @@ pub async fn build_database_adapters(backend: &str, url: &str) -> anyhow::Result
goal: w.goal,
user_settings: w.user_settings,
remote_goal: w.remote_goal,
refresh_session: Arc::new(domain::testing::PanicRefreshSessionRepository) as _,
refresh_session: Arc::new(postgres::PostgresRefreshSessionAdapter::new(w.pool.clone())) as _,
db_pool: DbPool::Postgres(w.pool),
})
}
@@ -118,7 +118,7 @@ pub async fn build_database_adapters(backend: &str, url: &str) -> anyhow::Result
goal: w.goal,
user_settings: w.user_settings,
remote_goal: w.remote_goal,
refresh_session: Arc::new(domain::testing::PanicRefreshSessionRepository) as _,
refresh_session: Arc::new(sqlite::SqliteRefreshSessionAdapter::new(w.pool.clone())) as _,
db_pool: DbPool::Sqlite(w.pool),
})
}