use async_trait::async_trait;
use super::{AppliedMigration, MigrationReport, PreparedMigration};
#[async_trait]
pub trait MigrationLedger: Send + Sync {
type Error: std::error::Error + Send + Sync + 'static;
async fn applied_migrations(&self) -> Result<Vec<AppliedMigration>, Self::Error>;
}
#[async_trait]
pub trait MigrationBackend: Send + Sync {
type Error: std::error::Error + Send + Sync + 'static;
async fn apply(&self, migrations: &[PreparedMigration])
-> Result<MigrationReport, Self::Error>;
}