pub trait DestructiveChangeChecker: Send + Sync {
    // Required methods
    fn check<'a>(
        &'a mut self,
        migration: &'a Migration
    ) -> BoxFuture<'a, ConnectorResult<DestructiveChangeDiagnostics>>;
    fn pure_check(&self, migration: &Migration) -> DestructiveChangeDiagnostics;
}
Expand description

Implementors of this trait are responsible for checking whether a migration could lead to data loss, or if it would be potentially unexecutable.

The type parameter is the connector’s DatabaseMigration type.

Required Methods§

source

fn check<'a>( &'a mut self, migration: &'a Migration ) -> BoxFuture<'a, ConnectorResult<DestructiveChangeDiagnostics>>

Check destructive changes resulting of applying the provided migration.

source

fn pure_check(&self, migration: &Migration) -> DestructiveChangeDiagnostics

Check the migration for destructive or unexecutable steps without performing any IO.

Implementors§