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.
This commit is contained in:
parent
af8bb1a03a
commit
957d170150
1 changed files with 3203 additions and 18 deletions
14
crates/remora-durable/src/migrate.rs
Normal file
14
crates/remora-durable/src/migrate.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
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
|
||||
}
|
||||
Loading…
Reference in a new issue