Struct photon_indexer::migration::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>
fn get_migration_files() -> Vec<Migration>
Get list of migrations wrapped in
Migration structsource§fn get_migration_models<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<Vec<Model>, DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_migration_models<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<Vec<Model>, DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get list of applied migrations from database
source§fn get_migration_with_status<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_migration_with_status<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get list of migrations with status
source§fn get_pending_migrations<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_pending_migrations<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get list of pending migrations
source§fn get_applied_migrations<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_applied_migrations<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get list of applied migrations
source§fn install<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn install<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Create migration table
seaql_migrations in the databasesource§fn fresh<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn fresh<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Drop all tables from the database, then reapply all migrations
source§fn refresh<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn refresh<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Rollback all applied migrations, then reapply all migrations
source§fn reset<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn reset<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Rollback all applied migrations
source§fn status<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn status<'life0, 'async_trait>(
db: &'life0 DatabaseConnection
) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Check the status of all 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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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