Add crash-safe attempt authority lifecycle

This commit is contained in:
ms2k 2026-07-17 07:07:43 +09:00
commit 2db0e22232

View file

@ -0,0 +1,12 @@
use sqlx::PgPool;
use crate::AttemptError;
pub async fn migrate(pool: &PgPool) -> Result<(), AttemptError> {
let mut migrator = sqlx::migrate!("./migrations");
migrator.dangerous_set_table_name("_remora_attempt_migrations");
migrator
.run(pool)
.await
.map_err(|error| AttemptError::Durable(remora_durable::DurableError::Migrate(error)))
}