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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.