pub trait Synchronize<DB>: Info<DB> + DatabaseOperation<DB>where
DB: Database,{
// Provided method
fn sync<'life0, 'life1, 'life2, 'async_trait, O>(
&'life0 self,
connection: &'life1 mut <DB as Database>::Connection,
old_migrator: &'life2 O,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where O: OldMigrator<DB> + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}
Expand description
Trait which is implemented by a migrator which supports synchronization from old migrator to new migrator
Provided Methods§
Sourcefn sync<'life0, 'life1, 'life2, 'async_trait, O>(
&'life0 self,
connection: &'life1 mut <DB as Database>::Connection,
old_migrator: &'life2 O,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
O: OldMigrator<DB> + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sync<'life0, 'life1, 'life2, 'async_trait, O>(
&'life0 self,
connection: &'life1 mut <DB as Database>::Connection,
old_migrator: &'life2 O,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
O: OldMigrator<DB> + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Synchronizes migrations from an older migration system to the sqlx migrator.
This function serves two primary purposes:
- Migrating from external migrations to
sqlx_migrator
migration - Handling table renames
Note: Migration timestamps are not preserved - the current time is used for entries
§Errors
If sync cannot be completed
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.