Struct leetcode_tui_rs::migrations::Migrator
source · 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 get_migration_files() -> Vec<Migration, Global>
fn get_migration_files() -> Vec<Migration, Global>
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, Global>, DbErr>> + Send + 'async_trait, Global>>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>>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, Global>, DbErr>> + Send + 'async_trait, Global>>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>>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, Global>, DbErr>> + Send + 'async_trait, Global>>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>>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, Global>, DbErr>> + Send + 'async_trait, Global>>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>>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, Global>>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>>where 'life0: 'async_trait, C: ConnectionTrait + '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, Global>>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>>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, Global>>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, Global>>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, Global>>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, Global>>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, Global>>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, Global>>where 'c: 'async_trait, C: IntoSchemaManagerConnection<'c> + 'async_trait, Self: 'async_trait,
Rollback all applied migrations
Auto Trait Implementations§
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