mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-04 08:27:46 +08:00
refactor(data): remove MySQL and SQLite support
Use PostgreSQL as the only database backend across runtime, schema tooling, installation, Compose, and CI. Update regression tests and reject removed drivers explicitly.
This commit is contained in:
@@ -8631,7 +8631,7 @@ enum WalletOwner<'a> {
|
||||
mod tests {
|
||||
use std::sync::Arc;
|
||||
|
||||
use aether_data::repository::pool_scores::SqlitePoolMemberScoreRepository;
|
||||
use aether_data::repository::pool_scores::PostgresPoolMemberScoreRepository;
|
||||
use aether_data::repository::provider_catalog::InMemoryProviderCatalogReadRepository;
|
||||
use aether_data_contracts::repository::provider_catalog::{
|
||||
StoredProviderCatalogKey, StoredProviderCatalogProvider,
|
||||
@@ -9349,12 +9349,11 @@ mod tests {
|
||||
.await
|
||||
.expect("a disabled score writer remains an allowed no-op");
|
||||
|
||||
let pool = sqlx::sqlite::SqlitePoolOptions::new()
|
||||
let pool = sqlx::postgres::PgPoolOptions::new()
|
||||
.max_connections(1)
|
||||
.connect("sqlite::memory:")
|
||||
.await
|
||||
.expect("sqlite pool should connect");
|
||||
let score_repository = Arc::new(SqlitePoolMemberScoreRepository::new(pool.clone()));
|
||||
.connect_lazy("postgres://localhost/aether")
|
||||
.expect("postgres pool should build");
|
||||
let score_repository = Arc::new(PostgresPoolMemberScoreRepository::new(pool.clone()));
|
||||
pool.close().await;
|
||||
let app = AppState::new()
|
||||
.expect("app state should build")
|
||||
|
||||
@@ -32,7 +32,7 @@ use super::{
|
||||
|
||||
const USERS_ME_USAGE_DATA_UNAVAILABLE_DETAIL: &str = "用户用量数据暂不可用";
|
||||
// The active-usage endpoint accepts an explicit list of request IDs. Keep
|
||||
// this list bounded before it reaches the repository layer: SQLite/MySQL
|
||||
// this list bounded before it reaches the repository layer: the database
|
||||
// expand every value into a bind parameter, while PostgreSQL still has to
|
||||
// materialize the complete array. Request IDs are normally UUIDs, but a
|
||||
// generous per-item bound preserves compatibility with provider-generated
|
||||
|
||||
Reference in New Issue
Block a user