MigrationRollback

Trait MigrationRollback 

Source
pub trait MigrationRollback {
    // Required methods
    async fn rollback_last_batch(&self) -> OrmResult<RollbackResult>;
    async fn rollback_batch(&self, batch: i32) -> OrmResult<RollbackResult>;
    async fn rollback_migration(&self, migration_id: &str) -> OrmResult<()>;
    async fn rollback_all(&self) -> OrmResult<RollbackResult>;
    async fn get_migrations_in_batch(
        &self,
        batch: i32,
    ) -> OrmResult<Vec<MigrationRecord>>;
}
Expand description

Extension trait for MigrationRunner to add rollback functionality

Required Methods§

Source

async fn rollback_last_batch(&self) -> OrmResult<RollbackResult>

Rollback the last batch of migrations

Source

async fn rollback_batch(&self, batch: i32) -> OrmResult<RollbackResult>

Rollback all migrations in a specific batch

Source

async fn rollback_migration(&self, migration_id: &str) -> OrmResult<()>

Rollback a specific migration by ID

Source

async fn rollback_all(&self) -> OrmResult<RollbackResult>

Rollback all applied migrations

Source

async fn get_migrations_in_batch( &self, batch: i32, ) -> OrmResult<Vec<MigrationRecord>>

Get migrations in a specific batch

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§