Trait MigrationSource

Source
pub trait MigrationSource<'s>: Debug {
    // Required method
    fn resolve(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, Box<dyn Error + Send + Sync>>> + Send + 's>>;
}

Required Methods§

Source

fn resolve( self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, Box<dyn Error + Send + Sync>>> + Send + 's>>

Implementations on Foreign Types§

Source§

impl MigrationSource<'static> for PathBuf

Source§

fn resolve( self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, Box<dyn Error + Send + Sync>>> + Send>>

Source§

impl<'s> MigrationSource<'s> for &'s Path

Implementation of the MigrationSource for std::path::Path.

The path has to point to a directory, which contains the migration SQL scripts. All these scripts must be stored in files with names using the format <VERSION>_<DESCRIPTION>.sql, where <VERSION> is a string that can be parsed into i64 and its value is greater than zero, and <DESCRIPTION> is a string.

Source§

fn resolve( self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, Box<dyn Error + Send + Sync>>> + Send + 's>>

Implementors§