a3s_orm/migration/
backend.rs1use async_trait::async_trait;
2
3use super::{AppliedMigration, MigrationReport, PreparedMigration};
4
5#[async_trait]
10pub trait MigrationLedger: Send + Sync {
11 type Error: std::error::Error + Send + Sync + 'static;
12
13 async fn applied_migrations(&self) -> Result<Vec<AppliedMigration>, Self::Error>;
14}
15
16#[async_trait]
21pub trait MigrationBackend: Send + Sync {
22 type Error: std::error::Error + Send + Sync + 'static;
23
24 async fn apply(&self, migrations: &[PreparedMigration])
25 -> Result<MigrationReport, Self::Error>;
26}