remora/crates/remora-durable/src/migrate.rs
ms2k 957d170150 Add PostgreSQL DurableStore substrate for WP-03
Introduce remora-durable with pool/migrations, a RemoraApiMutation-shaped
ledger, claim-fenced outbox projection, CAS helpers, and keyset cursors,
plus a kind Job acceptance suite against the hermetic fixture.
2026-07-16 03:56:44 +09:00

14 lines
311 B
Rust

use sqlx::PgPool;
use crate::error::DurableError;
static MIGRATOR: sqlx::migrate::Migrator = sqlx::migrate!("./migrations");
pub async fn migrate(pool: &PgPool) -> Result<(), DurableError> {
MIGRATOR.run(pool).await?;
Ok(())
}
pub fn migrator() -> &'static sqlx::migrate::Migrator {
&MIGRATOR
}