diesel::migration

Trait MigrationMetadata

Source
pub trait MigrationMetadata {
    // Provided method
    fn run_in_transaction(&self) -> bool { ... }
}
Expand description

This trait is designed to customize the behaviour of the default migration harness of diesel

Any new customization option will be added as new function here. Each new function will have a default implementation returning the old a value corresponding to the old uncustomized behaviour

Provided Methods§

Source

fn run_in_transaction(&self) -> bool

Whether the current migration is executed in a transaction or not

By default each migration is executed in a own transaction, but certain operations (like creating an index on an existing column) requires running the migration without transaction.

By default this function returns true

Implementors§