pub struct MigrationManager { /* private fields */ }Expand description
Migration manager for database schema evolution
Implementations§
Source§impl MigrationManager
impl MigrationManager
Sourcepub fn generate_create_table(&self, entity: &Entity) -> Result<String>
pub fn generate_create_table(&self, entity: &Entity) -> Result<String>
Generate CREATE TABLE statement from an entity
Sourcepub fn generate_foreign_keys(&self, entity: &Entity) -> Vec<String>
pub fn generate_foreign_keys(&self, entity: &Entity) -> Vec<String>
Generate foreign key constraints
Sourcepub fn generate_indexes(&self, entity: &Entity) -> Vec<String>
pub fn generate_indexes(&self, entity: &Entity) -> Vec<String>
Generate index creation statements
Sourcepub fn generate_junction_table(
&self,
m2m: &ManyToManyDefinition,
) -> Result<String>
pub fn generate_junction_table( &self, m2m: &ManyToManyDefinition, ) -> Result<String>
Generate junction table creation statement for a many-to-many relationship
Sourcepub fn generate_all_junction_tables(
&self,
registry: &EntityRegistry,
) -> Result<Vec<(String, String)>>
pub fn generate_all_junction_tables( &self, registry: &EntityRegistry, ) -> Result<Vec<(String, String)>>
Generate all junction tables for many-to-many relationships in the registry
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MigrationManager
impl RefUnwindSafe for MigrationManager
impl Send for MigrationManager
impl Sync for MigrationManager
impl Unpin for MigrationManager
impl UnwindSafe for MigrationManager
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> 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