feat: add SQLite and PostgreSQL event queue adapters with migrations

This commit is contained in:
2026-05-10 17:46:16 +02:00
parent 37b0e07055
commit dca50b46d1
10 changed files with 45 additions and 13 deletions

View File

@@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024"
[dependencies]
sqlx = { version = "0.8.6", features = ["runtime-tokio-rustls", "postgres", "macros", "chrono", "uuid"] }
sqlx = { version = "0.8.6", features = ["runtime-tokio-rustls", "postgres", "macros", "chrono"] }
domain = { workspace = true }
anyhow = { workspace = true }
async-trait = { workspace = true }

View File

@@ -1,5 +1,6 @@
pub(crate) async fn run(pool: &sqlx::PgPool) -> anyhow::Result<()> {
sqlx::migrate!("./migrations")
.set_ignore_missing(true)
.run(pool)
.await
.map_err(|e| anyhow::anyhow!("postgres-event-queue migration failed: {e}"))