pub struct SchemaMigrationManager { /* private fields */ }Expand description
Schema migration manager for handling table and view changes
Implementations§
Source§impl SchemaMigrationManager
impl SchemaMigrationManager
Sourcepub fn set_old_schema(self, tables: HashMap<String, Table>) -> Self
pub fn set_old_schema(self, tables: HashMap<String, Table>) -> Self
Set the old schema state
Sourcepub fn set_new_schema(self, tables: HashMap<String, Table>) -> Self
pub fn set_new_schema(self, tables: HashMap<String, Table>) -> Self
Set the new schema state
Sourcepub fn set_old_views(self, views: HashMap<String, View>) -> Self
pub fn set_old_views(self, views: HashMap<String, View>) -> Self
Set the old view schema state
Sourcepub fn set_new_views(self, views: HashMap<String, View>) -> Self
pub fn set_new_views(self, views: HashMap<String, View>) -> Self
Set the new view schema state
Sourcepub fn set_old_functions(
self,
functions: HashMap<String, StoredFunction>,
) -> Self
pub fn set_old_functions( self, functions: HashMap<String, StoredFunction>, ) -> Self
Set the old functions
Sourcepub fn set_new_functions(
self,
functions: HashMap<String, StoredFunction>,
) -> Self
pub fn set_new_functions( self, functions: HashMap<String, StoredFunction>, ) -> Self
Set the new functions
Sourcepub fn set_old_procedures(
self,
procedures: HashMap<String, StoredProcedure>,
) -> Self
pub fn set_old_procedures( self, procedures: HashMap<String, StoredProcedure>, ) -> Self
Set the old procedures
Sourcepub fn set_new_procedures(
self,
procedures: HashMap<String, StoredProcedure>,
) -> Self
pub fn set_new_procedures( self, procedures: HashMap<String, StoredProcedure>, ) -> Self
Set the new procedures
Sourcepub fn set_old_triggers(self, triggers: HashMap<String, Trigger>) -> Self
pub fn set_old_triggers(self, triggers: HashMap<String, Trigger>) -> Self
Set the old triggers
Sourcepub fn set_new_triggers(self, triggers: HashMap<String, Trigger>) -> Self
pub fn set_new_triggers(self, triggers: HashMap<String, Trigger>) -> Self
Set the new triggers
Sourcepub fn set_old_composite_types(
self,
composite_types: HashMap<String, CompositeType>,
) -> Self
pub fn set_old_composite_types( self, composite_types: HashMap<String, CompositeType>, ) -> Self
Set the old composite types
Sourcepub fn set_new_composite_types(
self,
composite_types: HashMap<String, CompositeType>,
) -> Self
pub fn set_new_composite_types( self, composite_types: HashMap<String, CompositeType>, ) -> Self
Set the new composite types
Sourcepub fn generate_migration(&self, name: &str) -> Result<Migration>
pub fn generate_migration(&self, name: &str) -> Result<Migration>
Generate a migration from the schema differences
Auto Trait Implementations§
impl Freeze for SchemaMigrationManager
impl RefUnwindSafe for SchemaMigrationManager
impl Send for SchemaMigrationManager
impl Sync for SchemaMigrationManager
impl Unpin for SchemaMigrationManager
impl UnsafeUnpin for SchemaMigrationManager
impl UnwindSafe for SchemaMigrationManager
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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