Trait starfish::migrator::prelude::MigratorTrait
[−]pub trait MigratorTrait: Send {
Show 13 methods
fn migrations() -> Vec<Box<dyn MigrationTrait + 'static, Global>, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
fn get_migration_files() -> Vec<Migration, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
{ ... }
fn get_migration_models<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<Model, Global>, DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
{ ... }
fn get_migration_with_status<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration, Global>, DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
{ ... }
fn get_pending_migrations<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration, Global>, DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
{ ... }
fn get_applied_migrations<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration, Global>, DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
{ ... }
fn install<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
{ ... }
fn fresh<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
{ ... }
fn refresh<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
{ ... }
fn reset<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
{ ... }
fn status<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
{ ... }
fn up<'life0, 'async_trait, C>(
db: &'life0 C,
steps: Option<u32>
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
{ ... }
fn down<'life0, 'async_trait, C>(
db: &'life0 C,
steps: Option<u32>
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
{ ... }
}
Expand description
Performing migrations on a database
Required methods
Provided methods
Get list of migrations wrapped in Migration
struct
fn get_migration_models<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<Model, Global>, DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
fn get_migration_models<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<Model, Global>, DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Get list of applied migrations from database
fn get_migration_with_status<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration, Global>, DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
fn get_migration_with_status<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration, Global>, DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Get list of migrations with status
fn get_pending_migrations<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration, Global>, DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
fn get_pending_migrations<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration, Global>, DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Get list of pending migrations
fn get_applied_migrations<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration, Global>, DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
fn get_applied_migrations<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration, Global>, DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Get list of applied migrations
fn install<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
fn install<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Create migration table seaql_migrations
in the database
fn fresh<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
fn fresh<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Drop all tables from the database, then reapply all migrations
fn refresh<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
fn refresh<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Rollback all applied migrations, then reapply all migrations
fn reset<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
fn reset<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Rollback all applied migrations
fn status<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
fn status<'life0, 'async_trait, C>(
db: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Check the status of all migrations
fn up<'life0, 'async_trait, C>(
db: &'life0 C,
steps: Option<u32>
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
fn up<'life0, 'async_trait, C>(
db: &'life0 C,
steps: Option<u32>
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Apply pending migrations
fn down<'life0, 'async_trait, C>(
db: &'life0 C,
steps: Option<u32>
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
fn down<'life0, 'async_trait, C>(
db: &'life0 C,
steps: Option<u32>
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait, Global>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Rollback applied migrations