pub struct MigrationGenerator;Expand description
Migration generator that creates SQL from schema diffs
Implementations§
Source§impl MigrationGenerator
impl MigrationGenerator
Sourcepub fn generate_migration(diffs: &[SchemaDiff]) -> String
pub fn generate_migration(diffs: &[SchemaDiff]) -> String
Generate migration SQL from schema differences
Sourcepub fn generate_table_migration(diffs: &[SchemaDiff]) -> String
pub fn generate_table_migration(diffs: &[SchemaDiff]) -> String
Generate table migration SQL from schema differences
Sourcepub fn generate_view_migration(diffs: &[SchemaDiff]) -> String
pub fn generate_view_migration(diffs: &[SchemaDiff]) -> String
Generate view migration SQL from schema differences
Sourcepub fn generate_index_change_sql(
index_name: &str,
old_index: &IndexMeta,
new_index: &IndexMeta,
) -> Vec<String>
pub fn generate_index_change_sql( index_name: &str, old_index: &IndexMeta, new_index: &IndexMeta, ) -> Vec<String>
Generate SQL for a specific index change
Sourcepub fn generate_event_change_sql(
event_name: &str,
old_event: &Event,
new_event: &Event,
) -> Vec<String>
pub fn generate_event_change_sql( event_name: &str, old_event: &Event, new_event: &Event, ) -> Vec<String>
Generate SQL for a specific event change
Auto Trait Implementations§
impl Freeze for MigrationGenerator
impl RefUnwindSafe for MigrationGenerator
impl Send for MigrationGenerator
impl Sync for MigrationGenerator
impl Unpin for MigrationGenerator
impl UnsafeUnpin for MigrationGenerator
impl UnwindSafe for MigrationGenerator
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