pub struct Migrator;
Trait Implementations§
Source§impl MigratorTrait for Migrator
impl MigratorTrait for Migrator
Source§fn migrations() -> Vec<Box<dyn MigrationTrait>>
fn migrations() -> Vec<Box<dyn MigrationTrait>>
Vector of migrations in time sequence
Source§fn migration_table_name() -> SeaRc<dyn Iden>
fn migration_table_name() -> SeaRc<dyn Iden>
Name of the migration table, it is
seaql_migrations
by defaultSource§fn get_migration_files() -> Vec<Migration>
fn get_migration_files() -> Vec<Migration>
Get list of migrations wrapped in
Migration
structSource§fn get_migration_models<'life0, 'async_trait, C>(
db: &'life0 C,
) -> Pin<Box<dyn Future<Output = Result<Vec<Model>, DbErr>> + Send + 'async_trait>>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>, DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
Get list of applied migrations from database
Source§fn get_migration_with_status<'life0, 'async_trait, C>(
db: &'life0 C,
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, DbErr>> + Send + 'async_trait>>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>, DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
Get list of migrations with status
Source§fn get_pending_migrations<'life0, 'async_trait, C>(
db: &'life0 C,
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, DbErr>> + Send + 'async_trait>>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>, DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
Get list of pending migrations
Source§fn get_applied_migrations<'life0, 'async_trait, C>(
db: &'life0 C,
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, DbErr>> + Send + 'async_trait>>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>, DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
Get list of applied migrations
Source§fn install<'life0, 'async_trait, C>(
db: &'life0 C,
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>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>>where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
Create migration table
seaql_migrations
in the databaseSource§fn status<'life0, 'async_trait, C>(
db: &'life0 C,
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>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>>where
'life0: 'async_trait,
C: ConnectionTrait + 'async_trait,
Self: 'async_trait,
Check the status of all migrations
Source§fn fresh<'c, 'async_trait, C>(
db: C,
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'c: 'async_trait,
C: IntoSchemaManagerConnection<'c> + 'async_trait,
Self: 'async_trait,
fn fresh<'c, 'async_trait, C>(
db: C,
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'c: 'async_trait,
C: IntoSchemaManagerConnection<'c> + 'async_trait,
Self: 'async_trait,
Drop all tables from the database, then reapply all migrations
Source§fn refresh<'c, 'async_trait, C>(
db: C,
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'c: 'async_trait,
C: IntoSchemaManagerConnection<'c> + 'async_trait,
Self: 'async_trait,
fn refresh<'c, 'async_trait, C>(
db: C,
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'c: 'async_trait,
C: IntoSchemaManagerConnection<'c> + 'async_trait,
Self: 'async_trait,
Rollback all applied migrations, then reapply all migrations
Source§fn reset<'c, 'async_trait, C>(
db: C,
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'c: 'async_trait,
C: IntoSchemaManagerConnection<'c> + 'async_trait,
Self: 'async_trait,
fn reset<'c, 'async_trait, C>(
db: C,
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'c: 'async_trait,
C: IntoSchemaManagerConnection<'c> + 'async_trait,
Self: 'async_trait,
Rollback all applied migrations
Auto Trait Implementations§
impl Freeze for Migrator
impl RefUnwindSafe for Migrator
impl Send for Migrator
impl Sync for Migrator
impl Unpin for Migrator
impl UnwindSafe for Migrator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more