pub struct SchemaMutations {
pub alter_column_type: bool,
pub alter_column_properties_atomic: bool,
}Expand description
The database’s capabilities to mutate the schema (tables, columns, indices).
Used by the migration generator to decide how to express schema changes. For example, SQLite cannot alter column types so migrations must recreate the table instead.
Pre-built configurations: SQLITE,
POSTGRESQL, MYSQL,
DYNAMODB.
§Examples
Access through Capability::schema_mutations:
use toasty_core::driver::Capability;
let cap = &Capability::POSTGRESQL;
assert!(cap.schema_mutations.alter_column_type);
assert!(!cap.schema_mutations.alter_column_properties_atomic);Fields§
§alter_column_type: boolWhether the database can change the type of an existing column.
alter_column_properties_atomic: boolWhether the database can change name, type and constraints of a column all withing a single statement.
Implementations§
Source§impl SchemaMutations
impl SchemaMutations
Sourcepub const POSTGRESQL: Self
pub const POSTGRESQL: Self
PostgreSQL schema mutation capabilities. Supports altering column types but not atomically changing multiple column properties.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaMutations
impl RefUnwindSafe for SchemaMutations
impl Send for SchemaMutations
impl Sync for SchemaMutations
impl Unpin for SchemaMutations
impl UnsafeUnpin for SchemaMutations
impl UnwindSafe for SchemaMutations
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